Sets of Characters in Excel VBA

A

aussie_craig

Thanks everyone, for your advice.
The "Like" operator is excellent and makes my code much more readabl
-

I'm sure you all know this - but just in case, the following works:

I wanted my test to return TRUE if the character was "0" to "9" or "."
While MyString Like "[0-9,.]"

sure beats
While MyString = "0" or MyString = "1" or MyString = "2" .......
etc

So once again, thanks for you help. You make life a lot easier
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top