jeff06
07-05-2007, 11:46 AM
I have a checkbox and two textbox.
i will do this: when I check the chechbox (checboxturn) if it is enable, it will be disable, if it is originally disable, it will be enabled.
The followng code does not work this way. How can I fix this problem?
Thanks.
<code>Private Sub CheckBoxTurn_Click()
If CheckBoxTurn.Enabled = True Then
CheckBoxTurn.Enabled = False
TextBoxTurnStart.Enabled = True
TextBoxTurnEnd.Enabled = True
End If
If CheckBoxTurn.Enabled = False Then
CheckBoxTurn.Enabled = True
TextBoxTurnStart.Enabled = False
TextBoxTurnEnd.Enabled = False
End If
End Sub
[/CODE]
i will do this: when I check the chechbox (checboxturn) if it is enable, it will be disable, if it is originally disable, it will be enabled.
The followng code does not work this way. How can I fix this problem?
Thanks.
<code>Private Sub CheckBoxTurn_Click()
If CheckBoxTurn.Enabled = True Then
CheckBoxTurn.Enabled = False
TextBoxTurnStart.Enabled = True
TextBoxTurnEnd.Enabled = True
End If
If CheckBoxTurn.Enabled = False Then
CheckBoxTurn.Enabled = True
TextBoxTurnStart.Enabled = False
TextBoxTurnEnd.Enabled = False
End If
End Sub
[/CODE]