Hi
i have a userform with 9 frames and 9 checkboxes, i want each checkbox to control the visibility of a frame and that of the other frames..
for example:
if checkbox1=true then i want it to just show frame 1
and if checkbox1 & checkbox2=true then i want it to show frame1 and frame2 below frame1 and so on,
i need to give the userform the ability to show any number of the frames depending on the combination of checkboxes that have been selected.
i tried the code below, but it doesn't seem to work past the 2nd IF
Private Sub checkbox5_Click()
If CheckBox5 = True Then
If CheckBox4 = True Then
Frame4.Visible = True
Frame4.Left = 6
Frame4.Top = 294
Frame5.Visible = True
Frame5.Left = 6
Frame5.Top = 506
Else
If CheckBox5 = True Then
If CheckBox4 = False Then
Frame4.Visible = False
Frame5.Visible = True
Frame5.Left = 6
Frame5.Top = 198
Else
If CheckBox5 = False Then
Frame2.Visible = False
End If
End If
End If
End If
End If
End Sub
is there a way to get this to work?
i have a userform with 9 frames and 9 checkboxes, i want each checkbox to control the visibility of a frame and that of the other frames..
for example:
if checkbox1=true then i want it to just show frame 1
and if checkbox1 & checkbox2=true then i want it to show frame1 and frame2 below frame1 and so on,
i need to give the userform the ability to show any number of the frames depending on the combination of checkboxes that have been selected.
i tried the code below, but it doesn't seem to work past the 2nd IF
Private Sub checkbox5_Click()
If CheckBox5 = True Then
If CheckBox4 = True Then
Frame4.Visible = True
Frame4.Left = 6
Frame4.Top = 294
Frame5.Visible = True
Frame5.Left = 6
Frame5.Top = 506
Else
If CheckBox5 = True Then
If CheckBox4 = False Then
Frame4.Visible = False
Frame5.Visible = True
Frame5.Left = 6
Frame5.Top = 198
Else
If CheckBox5 = False Then
Frame2.Visible = False
End If
End If
End If
End If
End If
End Sub
is there a way to get this to work?