Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
on Listbox in Userform.... x taol Excel Programming 7 October 4th 06 11:29 AM
userform listbox cannot get listbox.value to transfer back to main sub [email protected] Excel Programming 1 May 17th 06 09:44 PM
UserForm Listbox in VBC Marcia3641 Excel Discussion (Misc queries) 7 July 22nd 05 10:20 AM
UserForm with ListBox Otto Moehrbach[_6_] Excel Programming 4 December 5th 04 07:30 PM
UserForm ListBox Otto Moehrbach[_6_] Excel Programming 3 December 30th 03 06:22 PM


All times are GMT +1. The time now is 02:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"