Private Sub Command1_Click()
Dim sz As Integer, zm As Integer
For I = 1 To Len(Text1.Text)
Select Case Mid(Text1.Text, I, 1)
Case "A" To "Z", "a" To "z"
zm = zm + 1
Case "0" To "9"
sz = sz + 1
End Select
Next I
Text2.Text = "字母的个数为:" & zm
Text3.Text = "数字的个数为:" & sz
End Sub