The Student Room Group
If it's in a text box then I think a long way to do it (I'm not sure of a short way) would be something like

If yourtextbox.text = "1" Then
<insert code for what happens here>
Else if yourtextbox.text = "2" Then
<insert code for what happens here>
Else if yourtextbox.text = "5" Then
<insert code for what happens here
Else
<Insert error message code here>
End If
Reply 2
Short way:

If yourtextbox.text <> "1" OR "2" OR "5" then
MsgBox ("blablahbalh", vbyesno)
end if

Latest

Trending

Trending