Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21278

[RESOLVED] Using an if then state with a text box with 2 possible ifs??

$
0
0
Hi there! I am finishing up a program and I have a textbox called choiceTXT.text

In this box, I have the user type in something, and if what the user types in, is what the program is looking for, a msgbox will pop up saying "correct", very simple, lol, but the problem is I want to change it so if the user types in 1 thing OR another option, then the message box will pop up.

But the if then statement wont do something like

if ChoiceTXT.text = "Choice1" OR "Choice2" then
msgbox "correct"

else:
msgbox "incorrect"
end if

What I just wrote is sort of what I'm looking for, but I know it is not the way if statements work, is there a way to set up a case for something like this? Thanks!

Viewing all articles
Browse latest Browse all 21278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>