|
-
June 16th, 2000, 08:57 AM
#6
Re: Validating textbox input
maybe I should make the hex test more clear.
here is a sample
Dim teststring as string
teststring = "45H,0DH"
Dim r as new RegExp
r.Pattern = "[0-9A-F][0-9A-F][hH]"
Dim a() as string
a = Split(teststring, ",")
Dim i as Integer
for i = 0 to UBound(a)
If r.Test(a(i)) then
' ok
else
MsgBox "invalid entry: " & a(i)
End If
next i
...change it to your needs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|