回覆列表
  • 1 # 筱釧丶

    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

  • 中秋節和大豐收的關聯?
  • 求我等你等到頭髮都白了想你想到無法自撥的歌詞?