What is the VBA code to check whether or not a value has a special character?
(aside from using Ascii Code)....
Cheers!
Dinosaur1993
What is the VBA code to check whether or not a value has a special character?
(aside from using Ascii Code)....
Cheers!
Dinosaur1993
can you attach a sample file with desired result ?
If solved remember to mark Thread as solved
Its just like say for instance I have a textbox.
I will ask the user to enter a name (or any values without special characters (ie.~!@#$%^&*()). I want to check whether or not they have entered a string (and not a character) in the textbox
Hi, dinosaur1993,
your question is as clear as mud:
Could you please explain to me how you would call each single part of a string?Please Login or Register to view this content.
You may use Len and Replace to find out if any special cahracters have been used (or InStr) or you may have a look at this function which might be of help:
Ciao,Please Login or Register to view this content.
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Hello dinosaur1993,
This is probably closer to what you are looking for. This is a Function that will test a single character or multiple characters. It returns True only for letters A to Z (upper case and lower case) and the Space character. Any other character or characters in the string will return a False.
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
This should do
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks