By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,986 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,986 IT Pros & Developers. It's quick & easy.

Case and Not operator?

P: 24
is it possible to use the Not operator in Cases?
Nov 22 '07 #1
Share this Question
Share on Google+
3 Replies


kadghar
Expert 100+
P: 1,295
is it possible to use the Not operator in Cases?
Im not sure, but you can use IS <> or IS < or IS >
e.g.
Expand|Select|Wrap|Line Numbers
  1. dim a as string
  2. a= "Option Two"
  3. select case a
  4. Case Is <> "Option One"
  5.     msgbox "Its not Option One, its " & a
  6. case else
  7.     msgbox "Its Option One"
  8. end select
Nov 22 '07 #2

P: 24
Does it work if it is a string?
Nov 23 '07 #3

Expert 5K+
P: 8,434
Does it work if it is a string?
The posted example is a string.
Nov 23 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.