M
Macdonald
I'm using the Like operator to test the domain of a couple of email
addresses.
e.g.
The way it works right now is
A = "*@abc.com"
B = *@xyz.com
If strAddress Like A Then
GoTo ByeBye1
End if
If strAddress Like B Then
GoTo ByeBye2
End if
This all works fine and I could leave it like it is.
But is there not some simple way of using the "Or Operator" with the "Like
Operator" e.g. "Like A Or Like B", (which does not work) perhaps there is
some simple operation that my novice knowledge does not know of. Perhaps my
syntax is just bad.
I'm sure there are complex ways of doing this. I'm mean you could cut the
address out and put it into a string and then compare those strings with Or
but this seems more involved for than I wish. I mean in regular expressions
its as simple as. (.*@abc.com |.*@xyz.com)
I'm using windows 2000, Outlook Mail 2000 standard vba editor in Outlook.
Regards
addresses.
e.g.
The way it works right now is
A = "*@abc.com"
B = *@xyz.com
If strAddress Like A Then
GoTo ByeBye1
End if
If strAddress Like B Then
GoTo ByeBye2
End if
This all works fine and I could leave it like it is.
But is there not some simple way of using the "Or Operator" with the "Like
Operator" e.g. "Like A Or Like B", (which does not work) perhaps there is
some simple operation that my novice knowledge does not know of. Perhaps my
syntax is just bad.
I'm sure there are complex ways of doing this. I'm mean you could cut the
address out and put it into a string and then compare those strings with Or
but this seems more involved for than I wish. I mean in regular expressions
its as simple as. (.*@abc.com |.*@xyz.com)
I'm using windows 2000, Outlook Mail 2000 standard vba editor in Outlook.
Regards