VB问题,会的帮忙补充完整~~~

来源:百度知道 编辑:UC知道 时间:2024/05/31 00:03:20
建立一个文本框,在文本框中每输入一个字符,则立即判断:若是小写字母,则把它的大写形式显示在标签Label1中,若是大写字母,则把它的小写形式显示在标签Label2中,若是数字则把该字符直接显示在Label1中,其他字符不予显示。输入的字母(注意是字母)的总数显示在标签Label2中。
Dim n As Integer
Private Sub Text1_Change()
Dim ch As String*1
ch = Right$( ??? )
If ch >= "A" And ch <= "Z" Then
Label1.Caption = LCase(ch)
n = n + 1
ElseIf ??? Then
Label1.Caption = ???
n = n + 1
ElseIf ??? Then
Label1.Caption = ???
Else
Label1.Caption = ???
End If
Label2.Caption = ???
End Sub
问题补充:请帮忙补上打问号的7处~~~

Dim n As Integer
Private Sub Text1_Change()
Dim ch As String*1
ch = Right$( text1.text )
If ch >= "A" And ch <= "Z" Then
Label1.Caption = LCase(ch)
n = n + 1
ElseIf ch >= "a" And ch <= "z" Then
Label1.Caption = LCase(ch)
n = n + 1
ElseIf ch >= "0" And ch <= "9" Then
Label1.Caption = LCase(ch)
Else
Label1.Caption = ""
End If
Label2.Caption = n
End Sub