Compare String

  • Thread starter Thread starter Charles
  • Start date Start date
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
 
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.
 
Back
Top