为什么我在VB 6中的代码不起作用?

-4 vb6

当你键入(A,I,O,U,E)计数字符时我需要一个代码..我写了这个但它不起作用..请帮帮我..抱歉我的英语不好

n = Val(InputBox("enter a number"))
For i = 1 To Len(n)
      k = Mid(n, i, 1)
      k = LCase k
     Select Case k
          Case "a""i""o""u""e": t = t + 1

     End Select

Next
Print t
Run Code Online (Sandbox Code Playgroud)

Ale*_* K. 5

val() 将输入值转换为数字,以便永远不会有任何元音..删除它并纠正案例条件中缺少的逗号:

Dim n As String, t As Long
n = InputBox("enter a number")

For i = 1 To Len(n)
    Select Case LCase$(Mid$(n, i, 1))
        Case "a", "i", "o", "u", "e": t = t + 1
    End Select
Next
Print t
Run Code Online (Sandbox Code Playgroud)