jjc9809
asked on
Using Case Statements inside a Case Statement all inside an IF Statement.
Hello Everyone!
Is it possible to have sweveral case statements inside a case statement all inside an If Statement.
I have an IF Statement like this:
If Line1.text = "01" Then
Select Case Type = "01" Case VProv = "V" Do something
I also need to Select Case Type = "01" Case Vprov = " " Do something.
Can this be done all inside the If Then
I need to have multipler case statements inside a case statement all inside the IF Statement.
Am I making any sense?
jjc9809
Is it possible to have sweveral case statements inside a case statement all inside an If Statement.
I have an IF Statement like this:
If Line1.text = "01" Then
Select Case Type = "01" Case VProv = "V" Do something
I also need to Select Case Type = "01" Case Vprov = " " Do something.
Can this be done all inside the If Then
I need to have multipler case statements inside a case statement all inside the IF Statement.
Am I making any sense?
jjc9809
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
From what I understand in your question, you could do only one Select Case and simplify its declaration:
If Line1.Text = "01" Then
Select Case VProv
Case "V"
Do something
Case " "
Do something else
End Select
End If
And remember than in VB, if you fall into a case, this is the only one that will be considered. All the following ones that have the right conditions will be disregarded.