icbcnbxs(我来灌水) 正解 例题:程序内包括一个text1 和 一个command1 ------------------------------- Option ExplicitPrivate Sub Command1_Click() Dim a As String a = Text1 If Asc(a) >= 48 And Asc(a) <= 57 Then Cls: Print "数字" & Asc(a) If Asc(a) >= 65 And Asc(a) <= 90 Then Cls: Print "大写" & Asc(a) If Asc(a) >= 97 And Asc(a) <= 122 Then Cls: Print "小写" & Asc(a) End Sub ---------------------------------
dim a as string,i as integer a="1234ADNBC 在苛在职"for i=1 to len(a) if isnumeric(mid(a,i,i+1)) then debug.print "是数字" next
*****************************************************************************
欢迎使用CSDN论坛阅读器 : CSDN Reader(附全部源代码)
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
或者用这个来比较
If Trim(Val(Text1.Text))=Text1.Text Thenend if
呵呵
个人看法
http://hi.baidu.com/2427
例题:程序内包括一个text1 和 一个command1
-------------------------------
Option ExplicitPrivate Sub Command1_Click()
Dim a As String
a = Text1
If Asc(a) >= 48 And Asc(a) <= 57 Then Cls: Print "数字" & Asc(a)
If Asc(a) >= 65 And Asc(a) <= 90 Then Cls: Print "大写" & Asc(a)
If Asc(a) >= 97 And Asc(a) <= 122 Then Cls: Print "小写" & Asc(a)
End Sub
---------------------------------
a="1234ADNBC 在苛在职"for i=1 to len(a)
if isnumeric(mid(a,i,i+1)) then debug.print "是数字"
next