vb select case语句怎么用

2025-02-23 06:47:57
推荐回答(1个)
回答1:

根据你的用途,使用IF then
Private Sub Command1_Click()
If Len(Text1.Text) > 8 Then
Text1.Text = "": MsgBox "用户名过长,用户名最长为8位", , "提示"
ElseIf LCase(Text1.Text) Like "[!a-z]*" Then
MsgBox "用户名不为英文", , "提示"
ElseIf LCase(Text1.Text) Like "[a-z]*" Then
Unload Me
Form1.Show
End If
End Sub