Private Sub Form_Click()
Dim n As Integer
If IsNumeric(Text1.Text) Then
n = Val(Text1.Text)
Select Case n
Case 0
Text2.Text = "Sunday"
Case 1
Text2.Text = "Monday"
Case 2
Text2.Text = "Tuesday"
Case 3
Text2.Text = "Wednesday"
Case 4
Text2.Text = "Thursday"
Case 5
Text2.Text = "Friday"
Case 6
Text2.Text = "Saturday"
Case Else
MsgBox "请输入数字0-6"
End Select
Else
MsgBox "请输入数字0-6"
End If
End Sub