![]() |
Userform handling
Hi all.
My question is, how can i set off a part of an userform if a checkbox is set as true? the idea is that all other coices get "grey" and can't be handled until the input of the relationed data is finished. Exapmle: the checkbox should verify if a person pays cash or a credit card. if he pays cash, the information about the credit card should'n be available. thx a lot, rodrigo |
Userform handling
Hi,
You can set the Enabled property to True or False depending on whether its relevant. Some thing like this where the checkbox with tick is for Credit card stuff. Private Sub CheckBox1_Click() With CheckBox1 ' credit card related Label1.Enabled = .Value TextBox1.Enabled = .Value ' cash related Label2.Enabled = Not .Value Label2.Enabled = Not .Value End With End Sub Cheers Andy rodrigo wrote: Hi all. My question is, how can i set off a part of an userform if a checkbox is set as true? the idea is that all other coices get "grey" and can't be handled until the input of the relationed data is finished. Exapmle: the checkbox should verify if a person pays cash or a credit card. if he pays cash, the information about the credit card should'n be available. thx a lot, rodrigo -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Userform handling
on the click event of the checkbox, check that its value is true, then set
the enabled property of the controls you want greyed to false. Using Frames might make some of this easier. Disabling the frame will disable the controls in the frame (although the controls are not greyed - only the frame is). -- Regards, Tom Ogilvy "rodrigo" wrote in message lkaboutsoftware.com... Hi all. My question is, how can i set off a part of an userform if a checkbox is set as true? the idea is that all other coices get "grey" and can't be handled until the input of the relationed data is finished. Exapmle: the checkbox should verify if a person pays cash or a credit card. if he pays cash, the information about the credit card should'n be available. thx a lot, rodrigo |
Userform handling
Something like
Private Sub CheckBox1_Click() With TextBox1 If Me.CheckBox1.Value Then .Enabled = True .BackColor = &HFFFFFF Else .Enabled = False .BackColor = 12632256 End If End With End Sub -- HTH RP (remove nothere from the email address if mailing direct) "rodrigo" wrote in message lkaboutsoftware.com... Hi all. My question is, how can i set off a part of an userform if a checkbox is set as true? the idea is that all other coices get "grey" and can't be handled until the input of the relationed data is finished. Exapmle: the checkbox should verify if a person pays cash or a credit card. if he pays cash, the information about the credit card should'n be available. thx a lot, rodrigo |
All times are GMT +1. The time now is 07:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com