1、在窗体上画一个名为Command1的命令按钮和两个名为Label1、Label2的标签,一个名为Text1的文本框,
事件过程如下PrivateSubCommand1_Click()DimnAsInteger,mAsStringn=Val(Text1.Text)SelectCasenCa...
事件过程如下Private Sub Command1_Click()
Dim n As Integer, m As String
n = Val(Text1.Text)
Select Case n
Case 1
m = "星期一(Monday)"
Case 2
m = "星期二(Tuesday)"
Case 3
m = "星期三(Wednesday)"
Case 4
m = "星期四(Thursday)"
Case 5
m = "星期五(Friday)"
Case 6
m = "星期六(Saturday)"
Case 0
m = "星期日(Sunday)"
Case Else
m = "重新输入"
End Select
Label2.Caption = m
End Sub
程序运行后,在文本框Text1中输入10,然后单击命令按钮,则在标签Label2中显示的结果是【1】 展开
Dim n As Integer, m As String
n = Val(Text1.Text)
Select Case n
Case 1
m = "星期一(Monday)"
Case 2
m = "星期二(Tuesday)"
Case 3
m = "星期三(Wednesday)"
Case 4
m = "星期四(Thursday)"
Case 5
m = "星期五(Friday)"
Case 6
m = "星期六(Saturday)"
Case 0
m = "星期日(Sunday)"
Case Else
m = "重新输入"
End Select
Label2.Caption = m
End Sub
程序运行后,在文本框Text1中输入10,然后单击命令按钮,则在标签Label2中显示的结果是【1】 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询