Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #2211
| Newsgroups | comp.lang.basic.visual.misc |
|---|---|
| Date | 2014-12-27 10:55 -0800 |
| References | <01a069ac-0e7d-4808-adb8-a548c348c89a@googlegroups.com> <m7mr8q$9ki$1@dont-email.me> |
| Message-ID | <cb101b69-5c7b-4057-ae50-e4520917ae01@googlegroups.com> (permalink) |
| Subject | Re: VB6 IF OR THEN |
| From | geomodelers@gmail.com |
Hi Mayayana, whats mean 64 and 16? Thanks On Sunday, December 28, 2014 12:46:28 AM UTC+7, Mayayana wrote: > | I am trying use operator OR but does not work. The coding below; > | > | '--------------------------------- > | If Text1.Text <> "12" Or "53" Or "32" Or "63" Or "65" Then > | MsgBox "Incorrect", vbCritical > | Else > | MsgBox "Correct", vbInformation > | End If > | '--------------------------------- > | > | Anyone can solve my issue. Thanks in advance > | > > You have to spell it out: > > If Text1.text = "12" or Text1.text = "53".... > > A simpler way with so many tests is Select Case: > > Select Case Text1.Text > Case "12", "32", "53", "63", "65" > Msgbox "Correct, 64 > Case Else > MsgBox "Incorrect", 16 > End Select > > You can use as many Case elements as you like.
Back to comp.lang.basic.visual.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
VB6 IF OR THEN geomodelers@gmail.com - 2014-12-27 09:03 -0800
Re: VB6 IF OR THEN "Mayayana" <mayayana@invalid.nospam> - 2014-12-27 12:46 -0500
Re: VB6 IF OR THEN geomodelers@gmail.com - 2014-12-27 10:55 -0800
Re: VB6 IF OR THEN "Mayayana" <mayayana@invalid.nospam> - 2014-12-27 17:00 -0500
Re: VB6 IF OR THEN Deanna Earley <dee@earlsoft.co.uk> - 2015-01-02 10:03 +0000
csiph-web