VBScript – Select Case for 2 of the same options?

Home Forums Scripting General Scripting VBScript – Select Case for 2 of the same options?

Viewing 1 post (of 1 total)
  • Author

  • humbletech99

    I have got a select case statement in which I need two or more options to be mapped to the same action, something like

    Select Case strOption
    Case “abc” or “hjk”
    do something
    Case “xyz” or “sdf”
    do something else
    Case Else
    do last resort.
    End Select

    I really really don’t want to have to have a separate Case block for each option as this would double all the code for each option.

    I have checked the docs but cannot see a way of doing multiple cases at the same time.

    Any guidance on this would be much appreciated.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

13 Email Threat Types to Know About Right Now

As email threats evolve and multiply, keeping track of them all—and staying protected against the many different types—becomes a complex challenge. Today, that requires more than just the traditional email gateway solution that used to be good enough.

In this eBook you will learn:

  • What are the most common and challenging email attacks for organizations?
  • How to defend against sophisticated email threats, such as spoofing, social engineering, and fraud
  • How to protect employees at the inbox level with the right technologies and security-awareness training
  • How to use a multilayered protection strategy to reduce susceptibility to email attacks and better defend your business and employees

Sponsored by: