Using "or" in "If-then" statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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.
 

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

Back
Top