View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Select Case or If - What's the difference

Thinking of a better solution would be to keep your boolean events as an
Array so that you can loop through the array which saves lines of code..

If this post helps click Yes
---------------
Jacob Skaria


"Risky Dave" wrote:

Hi,

I have a set of about 40 possible Boolean events that I want to examine and
carry out actions dependant on which are true (more than one may be true but
I have no way of predicting which ones; it is also possible that none of them
are true).
I think I can probably do this using either a set of If ...Then statements:

If statement1=TRUE then
Action 1
End If
If statement 2=TRUE then
Action 2
End If
or I could use a a set of Select Case statements:

Select Case TRUE
Case statement 1
Action 1
Case statement 2
Action 2
End Select

What would be considered the better solution (and why?) or is there a more
efficient way of doing this?

TIA

Dave