ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sets of Characters in Excel VBA (https://www.excelbanter.com/excel-programming/314217-sets-characters-excel-vba.html)

aussie_craig[_3_]

Sets of Characters in Excel VBA
 

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

--
aussie_crai
-----------------------------------------------------------------------
aussie_craig's Profile: http://www.excelforum.com/member.php...fo&userid=1549
View this thread: http://www.excelforum.com/showthread.php?threadid=27071


Myrna Larson

Sets of Characters in Excel VBA
 
You are matching a comma as well. Was that intended?

On Wed, 20 Oct 2004 20:57:27 -0500, aussie_craig
wrote:


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

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.




All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com