G
Guest
Hi, hopefully this is a simple question 
When using an If Elseif Elseif Elseif....End If, are the Elseif's after the
first If only tested if the first if is true or only tested if the first if
is false as well as all the elseifs before it etc.
For instance, say hypothetically (even though this is not possible), that we
set the values of x equal to 2 and 5. What would happen with code that said
something like
If x =1 then
msgbox "1"
Elseif x = 2
msgbox "2"
Elseif x=3
msgbox "3"
Elseif x=4
msgbox "4"
Elseif x = 5
msgbox "5"
End if
Would you get messages boxes with 2, and 5? Just 2? Or none?
Thanks!

When using an If Elseif Elseif Elseif....End If, are the Elseif's after the
first If only tested if the first if is true or only tested if the first if
is false as well as all the elseifs before it etc.
For instance, say hypothetically (even though this is not possible), that we
set the values of x equal to 2 and 5. What would happen with code that said
something like
If x =1 then
msgbox "1"
Elseif x = 2
msgbox "2"
Elseif x=3
msgbox "3"
Elseif x=4
msgbox "4"
Elseif x = 5
msgbox "5"
End if
Would you get messages boxes with 2, and 5? Just 2? Or none?
Thanks!