单项选择题

编写如下事件过程:
Private Sub Form Click()
Dim Char As String,i As Integer
Const ch$="#"
msg$= "Enter a String:"
char=InputBox$(msg$)
n=Len(Char)
For i=1 To n
If Mid$(char,i,1)=ch$ Then
Exit For
End If
Next i
Print i - 1
End Sub
其中InputBox函数的功能是弹出一个输入对话框,按所给参数给出提示,等待用户输入,并返回输入的内容。程序运行后,单击窗体,如果在输入对话框内输入字符串“12ab$%*/#fg”,则窗体上输出

A.2
B.2
C.5
D.8