|
-
May 3rd, 2011, 06:40 PM
#1
Thread Starter
New Member
Comparison shortcuts for string content?
I'm trying to validate some input on an Excel form.
I want to ensure that people input HEX or BIN only. Is this some that can be done in a single IF statement? Comparing a multi-character string to an inclusive list? OR, do I have to loop through each individual character of the string and do a comparison?
I know there's shortcuts in ACCESS? (Or so it would seem with my searches)
Thanks for the help!
-
May 3rd, 2011, 07:32 PM
#2
Re: Comparison shortcuts for string content?
you could test if the string converts to a valid hex or binary value, otherwise i believe you would have to test each character, there are functions in the vb6 codebank that would do the conversion for binary
alternatively you could automate access from excel and pass the values for testing
Last edited by westconn1; May 3rd, 2011 at 07:36 PM.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
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
|