vb 在text1输入字符串,text2,text3分别显示大小写字母
2个回答
展开全部
Private Sub Text1_Change()
Text2 = ""
Text3 = ""
For I = 1 To Len(Text1)
If IsNumeric(Mid(Text1, I, 1)) = False Then
If LCase(Mid(Text1, I, 1)) = Mid(Text1, I, 1) Then Text3 = Text3 & Mid(Text1, I, 1)
If UCase(Mid(Text1, I, 1)) = Mid(Text1, I, 1) Then Text2 = Text2 & Mid(Text1, I, 1)
End If
Next
End Sub
Text2 = ""
Text3 = ""
For I = 1 To Len(Text1)
If IsNumeric(Mid(Text1, I, 1)) = False Then
If LCase(Mid(Text1, I, 1)) = Mid(Text1, I, 1) Then Text3 = Text3 & Mid(Text1, I, 1)
If UCase(Mid(Text1, I, 1)) = Mid(Text1, I, 1) Then Text2 = Text2 & Mid(Text1, I, 1)
End If
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询