Is there a way to shorten a code similar to the below? (i know it's not a complete code - it's an example) It just keeps going until they're all TRUE and then ends with an Else which has them all set to FALSE.
ValueX is determined elsewhere
Values A,B,C etc will be in increments of 1
If 'ValueX' = 'ValueA' Then
Frame1.Visible = True
Frame2.Visible = False
Frame3.Visible = False
Frame4.Visible = False
Frame5.Visible = False
Else If 'ValueX' = 'ValueB' Then
Frame1.Visible = True
Frame2.Visible = True
Frame3.Visible = False
Frame4.Visible = False
Frame5.Visible = False
Else If 'ValueX' = 'ValueC' Then
Frame1.Visible = True
Frame2.Visible = True
Frame3.Visible = True
Frame4.Visible = False
Frame5.Visible = False
etc
End If
I'm new to code (learning as I go) so if you could explain the different parts of your code it would be very helpful.
Bookmarks