This problem is simple and yet the answer eludes me.
I have a custom procedure that I call on the formload. basically if the checkbox is checked, then disable all the buttons, else enable them all. This seems to work when the form loads, it is unchecked. but when I check it again, the buttons are still enabled. I have a similar thing on the main form, except it will constantly check and do what the entire if then statement says.
What am I doing wrong? code below
I call this sub in the Form_load.
I have a custom procedure that I call on the formload. basically if the checkbox is checked, then disable all the buttons, else enable them all. This seems to work when the form loads, it is unchecked. but when I check it again, the buttons are still enabled. I have a similar thing on the main form, except it will constantly check and do what the entire if then statement says.
What am I doing wrong? code below
Code:
Private Sub DefaultCheck()
If ckdefault.Checked = True Then
emlclr.Enabled = False
navclr.Enabled = False
sysclr.Enabled = False
ctrlclr.Enabled = False
frmclr.Enabled = False
infoclr.Enabled = False
lblbkclr.Enabled = False
Else
emlclr.Enabled = True
navclr.Enabled = True
sysclr.Enabled = True
ctrlclr.Enabled = True
frmclr.Enabled = True
infoclr.Enabled = True
lblbkclr.Enabled = True
End If
End Sub
I call this sub in the Form_load.