Enable / Disable text box

  • Thread starter Thread starter 5070707
  • Start date Start date
5

5070707

Hi all,
I have a check box and a text box.
incase of the checkbox is checked i want the text box to be disabled.
i wrote as followed:

If cbxNewPc.Checked = True Then
tbxOldSerial.Enabled = False
End If

Works like magic.
But, what happens if the user uncheck the checkbox...how do i re-
enable the text box?

Thanks,
50
 
Hi all,
I have a check box and a text box.
incase of the checkbox is checked i want the text box to be disabled.
i wrote as followed:

If cbxNewPc.Checked = True Then
tbxOldSerial.Enabled = False
End If

Works like magic.
But, what happens if the user uncheck the checkbox...how do i re-
enable the text box?

Thanks,
50

Welp, i figured that "Brainer" alone :)
Cheers everyone!
 
Next time, just try:

tbxOldSerial.Enabled = cbxNewPc.Checked

in your cbxNewPc CheckedChanged event.

Much easier.

Cheers,
Johnny J.
 
Back
Top