Question : vba multiple select case

Can i have a nested select case within a select case statement?
select case abc
case =a
  Select case xyz
     case = x
         do something
     case = y
         do something
     end select
  case =b
    Select case xyz
       case = x
         do something
       case = y
         do something
     end select
end select
 

Answer : vba multiple select case

Sure!

Example:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Dim val As Integer
Dim myString As String

val = 1
myString = "test"

Select Case val
    Case 1
        Select Case myString
            Case "test"
                Stop
            Case "test1"
            Case "test2"
        End Select
    Case 2
    Case 2
End Select
Random Solutions  
 
programming4us programming4us