Using "or" in "If-then" statements

D

Donna

Is there a way to write an If then else statement like

If text20.value = "A" or "B", then
do something
else
do something different
end if

If so, what is the correct way; I can't seem to get it to work.
Thanks!
 
V

visdev1

This is how you would do it.

If text20.value = "A" or text20.value = "B" then
msgbox "do something"
else
msgbox "do something different"
end if

Hope this helps.
Good luck.
 
Top