C
Chey
I really got myself into a bind. I know there is an easier way
I have 6 checkboxes
and 6 command buttons.
When Check box 1 is checked then I only want to view Command button 1
When Check box 2 is checked Command button 2
and so on.
My command buttons are
For LS
Mary
Nita
For Lewis
For Mary
Non State
My Check boxes are
LS
LS Supervisor
Under Nita
Under Mary
CCPO Supervisor
Non State
When I run my code it only reflects the last part.
Please, please help.
If [LS] = True Then
[For LS].Visible = False
Else
[For LS].Visible = True
End If
If [LS] = True Then
[Mary].Visible = False
Else
[Mary].Visible = False
End If
If [LS] = True Then
[Nita].Visible = False
Else
[Nita].Visible = False
End If
If [LS] = True Then
[For Lewis].Visible = False
Else
[For Lewis].Visible = False
End If
If [LS] = True Then
[For Mary].Visible = False
Else
[For Mary].Visible = False
End If
If [LS Supervisor] = True Then
[For Lewis].Visible = True
Else
[For Lewis].Visible = False
End If
If [LS Supervisor] = True Then
[Mary].Visible = False
Else
[Mary].Visible = True
End If
If [LS Supervisor] = True Then
[Nita].Visible = False
Else
[Nita].Visible = True
End If
If [LS Supervisor] = True Then
[For Mary].Visible = False
Else
[For Mary].Visible = True
End If
If [LS Supervisor] = True Then
[For LS].Visible = False
Else
[For LS].Visible = True
End If
If [Under Nita] = True Then
[Mary].Visible = False
Else
[Mary].Visible = True
End If
If [Under Nita] = True Then
[Nita].Visible = True
Else
[Nita].Visible = False
End If
If [Under Nita] = True Then
[For Lewis].Visible = False
Else
[For Lewis].Visible = True
End If
If [Under Nita] = True Then
[For LS].Visible = False
Else
[For LS].Visible = True
End If
If [Under Mary] = True Then
[Mary].Visible = False
Else
[For LS].Visible = True
End If
If [Under Mary] = True Then
[Nita].Visible = False
Else
[Nita].Visible = True
End If
If [Under Mary] = True Then
[For Lewis].Visible = False
Else
[For Lewis].Visible = True
End If
If [Under Mary] = True Then
[For LS].Visible = False
Else
[For LS].Visible = True
End If
If [Under Mary] = True Then
[For Mary].Visible = True
Else
[For LS].Visible = False
End If
I have 6 checkboxes
and 6 command buttons.
When Check box 1 is checked then I only want to view Command button 1
When Check box 2 is checked Command button 2
and so on.
My command buttons are
For LS
Mary
Nita
For Lewis
For Mary
Non State
My Check boxes are
LS
LS Supervisor
Under Nita
Under Mary
CCPO Supervisor
Non State
When I run my code it only reflects the last part.
Please, please help.
If [LS] = True Then
[For LS].Visible = False
Else
[For LS].Visible = True
End If
If [LS] = True Then
[Mary].Visible = False
Else
[Mary].Visible = False
End If
If [LS] = True Then
[Nita].Visible = False
Else
[Nita].Visible = False
End If
If [LS] = True Then
[For Lewis].Visible = False
Else
[For Lewis].Visible = False
End If
If [LS] = True Then
[For Mary].Visible = False
Else
[For Mary].Visible = False
End If
If [LS Supervisor] = True Then
[For Lewis].Visible = True
Else
[For Lewis].Visible = False
End If
If [LS Supervisor] = True Then
[Mary].Visible = False
Else
[Mary].Visible = True
End If
If [LS Supervisor] = True Then
[Nita].Visible = False
Else
[Nita].Visible = True
End If
If [LS Supervisor] = True Then
[For Mary].Visible = False
Else
[For Mary].Visible = True
End If
If [LS Supervisor] = True Then
[For LS].Visible = False
Else
[For LS].Visible = True
End If
If [Under Nita] = True Then
[Mary].Visible = False
Else
[Mary].Visible = True
End If
If [Under Nita] = True Then
[Nita].Visible = True
Else
[Nita].Visible = False
End If
If [Under Nita] = True Then
[For Lewis].Visible = False
Else
[For Lewis].Visible = True
End If
If [Under Nita] = True Then
[For LS].Visible = False
Else
[For LS].Visible = True
End If
If [Under Mary] = True Then
[Mary].Visible = False
Else
[For LS].Visible = True
End If
If [Under Mary] = True Then
[Nita].Visible = False
Else
[Nita].Visible = True
End If
If [Under Mary] = True Then
[For Lewis].Visible = False
Else
[For Lewis].Visible = True
End If
If [Under Mary] = True Then
[For LS].Visible = False
Else
[For LS].Visible = True
End If
If [Under Mary] = True Then
[For Mary].Visible = True
Else
[For LS].Visible = False
End If