Private Sub Command1_Click()
s = Len(Text1)
For i = 1 To s
If Mid(Text1, i, 1) <> 32 Then "沒空格
If 97 < Asc(Mid(Text1, i, 1)) And Asc(Mid(Text1, i, 1)) < 122 Then a = a + 1 "小寫字母
If 65 < Asc(Mid(Text1, i, 1)) And Asc(Mid(Text1, i, 1)) < 90 Then b = b + 1 "大寫的
If 48 < Asc(Mid(Text1, i, 1)) And Asc(Mid(Text1, i, 1)) < 57 Then c = c + 1 "數字
End If
Print d
Next i
Print "小寫字母" & a & "個"
Print "大寫字母" & b & "個"
Print "數字" & c & "個"
Print "其它(包括空格)" & s - a - b - c & "個"
Print s
End Sub
Private Sub Command1_Click()
s = Len(Text1)
For i = 1 To s
If Mid(Text1, i, 1) <> 32 Then "沒空格
If 97 < Asc(Mid(Text1, i, 1)) And Asc(Mid(Text1, i, 1)) < 122 Then a = a + 1 "小寫字母
If 65 < Asc(Mid(Text1, i, 1)) And Asc(Mid(Text1, i, 1)) < 90 Then b = b + 1 "大寫的
If 48 < Asc(Mid(Text1, i, 1)) And Asc(Mid(Text1, i, 1)) < 57 Then c = c + 1 "數字
End If
Print d
Next i
Print "小寫字母" & a & "個"
Print "大寫字母" & b & "個"
Print "數字" & c & "個"
Print "其它(包括空格)" & s - a - b - c & "個"
Print s
End Sub