|
-
May 24th, 2002, 10:56 AM
#1
Thread Starter
Junior Member
Like Operator
I am currently extracting some information out of a long string of text and one of the variables I am extracting is plain numbers approx 6 charaacters in length.
Unfortunatly some people have put in strings such as 00:20 which causes a Type Mismatch as I only want to output numbers.
Therefore I am trying the like operator to capture these but I have a problem:
currently using :
---------------------------------------------------------------------------
varUserErr = strTime Like "[0-9]"
If varUserErr = False Then
msgbox "Another idiot has put the wrong info in!"
End If
---------------------------------------------------------------------------
The problem is that if they put in 20 or anything else with more than 1 digit it returns False,
Therefore how can I check for 6 characters of just numbers?
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
|