你可以部分地这样修改(建议用正则表达式而不用这么麻烦!)
Dim i,c
For i = 1 to len("stU123*&")
c = asc(mid("strU123*&",i,1))
msgbox c
If( (asc(48)<c)and(c>asc(57)) )or ((asc(65)<c)and (c<asc(90)))or ((asc(97)<c)and(c<asc(122)))Then
msgbox("right!")
else
msgbox("error!")
End If
Next