Jump to content

Issue with variable


Recommended Posts

It's not the Switch line that fails. It's the Case lines that fails. In a Switch statement you can only use literal values in the Case lines. From the Help file:

Case <value> [To <value>] [,<value> [To <value>] ...]

You cannot use expressions eg. string functions on the Case values in a Switch statement. StringInStr() will not work.

 

You can use expressions on the Case values in a Select statement. From the Help file:

Case <expression1>

StringInStr() works in a Select statement.

And you can use expressions in If statements.

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...