Archive of Mr Excel Message Board
I have put a userform in my workbook that allows a user opening it to enter new information on a worksheet via the userform. I would like to know how to have a certain section of that userform "grayed out" (user cannot select options), but made available based on certain selections made from a listbox on the form.
Example: In a drop-down list box a user will select from list "NRFT", "SEFT", and "MUPT". There are a set of optionbuttons on the userform which have been put within a frame. I would like the optionbuttons located within that frame grayed out by default (user can't input anything). But if user selects "SEFT" from the list box, then the area is no longer grayed out, and optionbuttons are now able to select--(because this section is only relevant to "SEFT", but not the other options). Hope this made sense...thanks...rm

| Check out our Excel VBA Resources | ||||
![]() |
![]() |
![]() |
![]() |
![]() |
Turn the "Locked" property to "TRUE". This will keep the object visable, but not allow any interaction.
The other method would be to turn the object property "Visible" to "FALSE". This will hide the object entirely (which may help in minimizing a user's confusion).
You can turn these on or off at the time a selection is made (ListBox1_Change), but don't forget to reverse the action (like when the listbox is re-entered).


RM
you need to set the enabled property of the optionbox.....set this to false @ load time
or just by setting them to false by default
in you setup.
Then enable them when your condition is met eg
If ..... then Optionbox1.enabled = true
etc
Ivan

