if asc(char)>64 and asc(char)<91 then messagebox "is letter" end if
If AChar >= "A" And AChar <= "Z" Then ...... End If
If asc(AChar) >= asc("A") And asc(AChar) <= asc("Z") Then debug.print "yes" End If
function checkchar(char as string) as boolen dim s as string,s1 as string s="ABCDEFGHIJKLMNOPQRSTUVWXYZ" s1=left$(char,1) if instr(1,s,s1)>0 then checkchar=true end function
用ASC(Char)判断一下Private Function bIsCap(byval sChar as String)as boolean
bIsCap=(ASC(sChar)>64 and ASC(sChar)<91)
End Function
messagebox "is letter"
end if
......
End If
If asc(AChar) >= asc("A") And asc(AChar) <= asc("Z") Then
debug.print "yes"
End If
dim s as string,s1 as string
s="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
s1=left$(char,1)
if instr(1,s,s1)>0 then checkchar=true
end function