09-10-2008, 03:05 PM
Example code:
Once it found case 2 and does what it needs to - it will exit the select case. So it looks like it doesn't evalute every expression.
Doing that - it would have to check every statement unless you tell it to exit the sub or something.
Code:
l = 2
Select Case l
Case 1
b = True
Case 2
b = True
Case 3
b = True
Case 4
b = True
End Select
Once it found case 2 and does what it needs to - it will exit the select case. So it looks like it doesn't evalute every expression.
Code:
l = 2
If l = 1 Then
b = True
End If
If l = 2 Then
b = True
End If
If l = 3 Then
b = True
End If
If l = 4 Then
b = True
End If
Doing that - it would have to check every statement unless you tell it to exit the sub or something.