Option Explicit
Dim lettles As Integer
Dim space As Integer
Dim digit As Integer
Dim others As Integer
Dim add As String
Dim InputStr As String
Dim i As Integer
Dim CaseStr As String
Private Sub CmbStart_Click()
lettles = 0
space = 0
digit = 0
others = 0
InputStr = txtInput.Text
For i = 1 To Len(InputStr)
CaseStr = Mid(InputStr, i, 1)
If CaseStr >= "a" And CaseStr <= "z" Or CaseStr >= "A" And CaseStr <= "Z" Then
lettles = lettles + 1
ElseIf CaseStr = " " Then
space = space + 1
ElseIf CaseStr >= 0 And CaseStr <= 9 Then
digit = digit + 1
Else
others = others + 1
End If
Next
实时错误13 类型不匹配