Select Case, can I add two parameters here, convert string problems

Select Case, can I add two parameters here, convert string problems

tracey
Enthusiast Enthusiast
688 Views
1 Reply
Message 1 of 2

Select Case, can I add two parameters here, convert string problems

tracey
Enthusiast
Enthusiast

Hi Guys, still trying to fix the problem. 

Door_Lower and Door_Upper have derived values of KK and L.  Trying to get the code to choose a Door (Case1, etc)

 

Any thoughts

 

Dim expression As String = (Door_Lower) AndAlso (Door_Upper) 
Select Case (Door_Lower) AndAlso (Door_Upper)       
    Case 1 "AA","BB","CC","DD","EE","FF","II","JJ","KK","LL","OO","PP","QQ","GG","HH","MM","NN"
        
        MsgBox("Door E6 Both")
            
    Case 2 "GG","HH","MM","NN","G","H","M","N"
        
        MsgBox("Door E2E4 Both")
        
    Case 4 "A","B","C","D","E","F","I","J","K","L","O","P","Q","G","H","M","N"
        
        MsgBox("Door E6 Lower.")
            
    Case 4 "GG","HH","MM","NN","A","B","C","D","E","F","I","J","K","L","O","P","Q","G","H","M","N"
        
        MsgBox("Door E6 Upper.")
        
    Case Else 
    
        MsgBox("No match found.")
           
End Select

 

0 Likes
689 Views
1 Reply
Reply (1)
Message 2 of 2

bretrick30
Advocate
Advocate

Hi,

 

I know I'm kind of late to the party, but you are still having issues with this,  remove the number after the cases:

 

Case "AA","BB","CC","DD","EE","FF","II","JJ","KK","LL","OO","PP","QQ","GG","HH","MM","NN"

 

0 Likes