输入一个数字(1――7),分别用select语句和choose函数两种方法显示对应的星期一到星期日
输入一个数字(1――7),分别用select语句和choose函数两种方法显示对应的星期一到星期日vb程序设计...
输入一个数字(1――7),分别用select语句和choose函数两种方法显示对应的星期一到星期日vb程序设计
展开
1个回答
展开全部
Private Sub Command1_Click()
Dim n As Integer
n = Text1
Select Case n
Case 1: s = "星期一"
Case 2: s = "星期二"
Case 3: s = "星期三"
Case 4: s = "星期四"
Case 5: s = "星期五"
Case 6: s = "星期六"
Case 7: s = "星期日"
End Select
Text2 = s
End Sub
Private Sub Command2_Click()
Dim n As Integer
n = Text1
s = Choose(n, "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日")
Text3 = s
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询