• Select case using NOT operator (97)

    Author
    Topic
    #376647

    Select case using NOT operator
    I

    Viewing 0 reply threads
    Author
    Replies
    • #617601

      The correct syntax would be:

      Case Is  "Dir", Is  "Mgr", Is  "Coord"

      But I don’t think that’s what you want, because ANY string evaluated will equate to true, including “Dir”, etc. Shouldn’t it be AND separating the items, not OR?? You may try this instead:

      If strA  "Dir" And strA  "Mgr" And strA  "Coord" Then
          MsgBox "True.", vbInformation, "TRUE"
      Else
          MsgBox "False.", vbInformation, "FALSE"
      End If

      Replace “strA” with your string variable to test this.

      HTH

      • #617604

        Yes that was more along the lines of what I was looking for, thanks.

    Viewing 0 reply threads
    Reply To: Select case using NOT operator (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: