Enable / Disable text box

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
 
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

Welp, i figured that "Brainer" alone :)
Cheers everyone!
 
J

Johnny Jörgensen

Next time, just try:

tbxOldSerial.Enabled = cbxNewPc.Checked

in your cbxNewPc CheckedChanged event.

Much easier.

Cheers,
Johnny J.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top