比如:有一个输入框中,现在只许输入1234567890+*#PWpwNn字符,输入其他字符就会弹出提示,我需要判断输入的字符是否属于1234567890+*#PWpwNn中的字符,并且没有其他字符?
就以上面的的字符串为例子,能给个具体的写法不?
追答txtInput=inputbox("Enter the Text","Tip")
i=1
Do while i<=len(txtInput)
if instr("1234567890+*#PWpwNn",mid(txtInput,i,1))<=0 then
msgbox "error char:" & mid(txtInput,i,1)
end if
i=i+1
Loop