ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dimming Controls (https://www.excelbanter.com/excel-programming/279280-dimming-controls.html)

David Benson[_2_]

Dimming Controls
 
I am developing a macro that has a UserForm with several controls (combo
boxes, list boxes, and option buttons). The option buttons are used to
determine whether or not a particular list box or combo box is enabled. If
an option button is deselected, the associated list box will not be enabled;
if the option button is selected, then the associated list box is enabled.

The Help file says that when a control is not enabled, it should appear
dimmed. Mine don't! The look the same regardless of whether or not they
are enabled.

The enabling/un-enabling is working, because when a list box is not enabled,
I can't select it.

Does anyone have any idea what I'm doing wrong?

Thanks.

David Benson



steve

Dimming Controls
 
David,

Using Excel97 -

When Enabled is set to False
ComboBox scroll bar is greyed out.
List box looks the same but am unable to select anything
Command buttons are greyed out.

Make sure that your option button event code is correct. You need 2
code snippets...

Private Sub OptionButton1_Click()
ComboBox1.Enabled = True
End Sub
Private Sub OptionButton2_Click()
ComboBox1.Enabled = False
End Sub

--
sb
"David Benson" wrote in message
...
I am developing a macro that has a UserForm with several controls (combo
boxes, list boxes, and option buttons). The option buttons are used to
determine whether or not a particular list box or combo box is enabled.

If
an option button is deselected, the associated list box will not be

enabled;
if the option button is selected, then the associated list box is enabled.

The Help file says that when a control is not enabled, it should appear
dimmed. Mine don't! The look the same regardless of whether or not they
are enabled.

The enabling/un-enabling is working, because when a list box is not

enabled,
I can't select it.

Does anyone have any idea what I'm doing wrong?

Thanks.

David Benson






All times are GMT +1. The time now is 05:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com