完整代码如下:
Option Explicit
Private Sub Form_Click()
Dim n As Integer
n = Val(Text1.Text)
Select Case n
Case 1
Text2.Text = "星期一"
Case 2
Text2.Text = "星期二"
Case 3
Text2.Text = "星期三"
Case 4
Text2.Text = "星期四"
Case 5
Text2.Text = "星期五"
Case 6
Text2.Text = "星期六"
Case 7
Text2.Text = "星期日"
Case Else
Text2.Text = "输入错误!"
End Select
End Sub
if text1.text="0"then
text2.text="星期天的英文"
elseif ...
elseif...
...
end if