Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Grey out listbox in userform
I have a userform. I want to prohibit the user from one of the listboxes at
certain times. I know I can set the .Enabled propterty = False. But how to you grey out the listbox? Thanks EM |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Grey out listbox in userform
Maybe hiding it would work better.
ListBox1.Hide If they can't see it they can't use it. "ExcelMonkey" wrote: I have a userform. I want to prohibit the user from one of the listboxes at certain times. I know I can set the .Enabled propterty = False. But how to you grey out the listbox? Thanks EM |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Grey out listbox in userform
Sorry, Hide is for the whole UserForm
ListBox1.Visible = False Would hide the control. "ExcelMonkey" wrote: I have a userform. I want to prohibit the user from one of the listboxes at certain times. I know I can set the .Enabled propterty = False. But how to you grey out the listbox? Thanks EM |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Grey out listbox in userform
.... and maybe you could then display a label with the listbox value instead.
-- Tim Williams Palo Alto, CA "JLGWhiz" wrote in message ... Sorry, Hide is for the whole UserForm ListBox1.Visible = False Would hide the control. "ExcelMonkey" wrote: I have a userform. I want to prohibit the user from one of the listboxes at certain times. I know I can set the .Enabled propterty = False. But how to you grey out the listbox? Thanks EM |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Grey out listbox in userform
Hi,
Try changing the forecolor to give a visual clue to the listbox's state. If ListBox1.Enabled Then ListBox1.ForeColor = SystemColorConstants.vbWindowText Else ListBox1.ForeColor = SystemColorConstants.vbGrayText End If Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "ExcelMonkey" wrote in message ... I have a userform. I want to prohibit the user from one of the listboxes at certain times. I know I can set the .Enabled propterty = False. But how to you grey out the listbox? Thanks EM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
on Listbox in Userform.... | Excel Programming | |||
userform listbox cannot get listbox.value to transfer back to main sub | Excel Programming | |||
UserForm Listbox in VBC | Excel Discussion (Misc queries) | |||
UserForm with ListBox | Excel Programming | |||
UserForm ListBox | Excel Programming |