Compare String

C

Charles

HI,

At one time I had a line of code that check a string of text as an
example of the string.
WIN01,WIN02,DOM01,DOM10
Now what I'm trying to do is if I set a variable to
MyVar = "DOM10"

If the variable sees "DOM10" in the string it will fire off a macro.

Any help would be appreciated.

CharlesH
 
C

Charles

Use the InStr function and see if it returns a value > 0

e.g.  If InStr(Text_string, MyVar) > 0 then YourMacro
--ron

Ron,

Thanks for the reply will give it a try.
 

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