Connecting Tech Pros Worldwide Forums | Help | Site Map

Enable / Disable text box

5070707@gmail.com
Guest
 
Posts: n/a
#1: May 7 '07
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


5070707@gmail.com
Guest
 
Posts: n/a
#2: May 7 '07

re: Enable / Disable text box


On May 7, 9:08 pm, 5070...@gmail.com wrote:
Quote:
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!

Johnny Jörgensen
Guest
 
Posts: n/a
#3: May 8 '07

re: Enable / Disable text box


Next time, just try:

tbxOldSerial.Enabled = cbxNewPc.Checked

in your cbxNewPc CheckedChanged event.

Much easier.

Cheers,
Johnny J.



<5070707@gmail.comwrote in message
news:1178564883.437580.104390@l77g2000hsb.googlegr oups.com...
Quote:
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
>

Closed Thread