VB求大神帮助~! :编程完成下面功能:在窗体上设置2文本框,要求在文本框Text1中输入一个0~

VB求大神帮助~! :编程完成下面功能:在窗体上设置2文本框,要求在文本框Text1中输入一个0~6的整数,然后单机窗体,则在文本框Text2中用英文显示是星期几。太谢谢!

完整代码如下:
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
温馨提示:内容为网友见解,仅供参考
第1个回答  2015-04-19
if text1.text="0"then
text2.text="星期天的英文"
elseif ...
elseif...
...
end if
相似回答