Case and Not operator?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • halo combat22
    New Member
    • Oct 2007
    • 24

    Case and Not operator?

    is it possible to use the Not operator in Cases?
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by halo combat22
    is it possible to use the Not operator in Cases?
    Im not sure, but you can use IS <> or IS < or IS >
    e.g.
    [CODE=vb]dim a as string
    a= "Option Two"
    select case a
    Case Is <> "Option One"
    msgbox "Its not Option One, its " & a
    case else
    msgbox "Its Option One"
    end select[/CODE]

    Comment

    • halo combat22
      New Member
      • Oct 2007
      • 24

      #3
      Does it work if it is a string?
      Last edited by Killer42; Nov 23 '07, 02:25 AM.

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by halo combat22
        Does it work if it is a string?
        The posted example is a string.

        Comment

        Working...