Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Case Statement

Status
Not open for further replies.

VBUser77

MIS
Jan 19, 2005
95
0
0
US
Is it possible to check the value of multiple variables at the same time through select case statement. In other words can i do this:

Select Var1, Var2

case 2, 3
Code comes here

End Select

If Var1 is 2 and Var2 is 3 then execute the code.

Thanks a lot in advance for your help.

Jay

 
The select case statement only evaluates one criterion.

[tt]select case var1
case 2, 3, 5 to 10
...[/tt]

but, you can also do the following:

[tt]select case true
case Var1 = 2 and Var2 = 3
...[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top