Home > How-To Library > Coding Basics

How to use more than one condition in Select case statement

**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * ****************************************************************
Sub Main() Select Case True Case Combo1.ListIndex = 0 And List1.ListIndex = 0 MsgBox "combo listindex = 0 and list.listindex=0" Case Combo1.ListIndex = 0 And List1.ListIndex = 1 MsgBox "combo listindex = 0 and list.listindex=1" Case Combo1.ListIndex = 0 And List1.ListIndex = 2 MsgBox "combo listindex = 0 and list.listindex=2" Case Else MsgBox "none of the previous" End Select End Sub

If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.