Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default lock listbox items

Is there a way of locking individual items in a listbox on a userform so as
they cannot be selected by the user?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default lock listbox items

AFAIK it's not possible.
Also, that would confuse the user; why give them the choice if they cannot
select it ?
Edit the list before you show it.

NickHK

"enyaw" wrote in message
...
Is there a way of locking individual items in a listbox on a userform so

as
they cannot be selected by the user?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default lock listbox items

The listbox I have is populated by items on a worksheet. The items cannot be
moved in the worksheet because they are being used in a data validation. I
have code that links the listbox to the worksheet so when the item is
selected in the listox it is also selected on the worksheet. I need to be
able to reference only some of the list on the worksheet for the listbox.
e.g. I need say A6:A10 and A12:A15.
Any ideas?

"NickHK" wrote:

AFAIK it's not possible.
Also, that would confuse the user; why give them the choice if they cannot
select it ?
Edit the list before you show it.

NickHK

"enyaw" wrote in message
...
Is there a way of locking individual items in a listbox on a userform so

as
they cannot be selected by the user?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default lock listbox items

Only add the valid items to the listbox, with .AddItem.

NickHK

"enyaw" wrote in message
...
The listbox I have is populated by items on a worksheet. The items cannot

be
moved in the worksheet because they are being used in a data validation.

I
have code that links the listbox to the worksheet so when the item is
selected in the listox it is also selected on the worksheet. I need to be
able to reference only some of the list on the worksheet for the listbox.
e.g. I need say A6:A10 and A12:A15.
Any ideas?

"NickHK" wrote:

AFAIK it's not possible.
Also, that would confuse the user; why give them the choice if they

cannot
select it ?
Edit the list before you show it.

NickHK

"enyaw" wrote in message
...
Is there a way of locking individual items in a listbox on a userform

so
as
they cannot be selected by the user?






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
add items to listbox Baha Excel Programming 1 November 24th 06 01:44 AM
Reorder items in listbox Marvin Excel Programming 1 January 27th 05 03:40 PM
Adding Items to a ListBox-Unique Items Only jpendegraft[_14_] Excel Programming 2 May 2nd 04 02:27 AM
Items in a Listbox Todd Huttenstine Excel Programming 1 April 26th 04 03:36 PM
listing items from listbox Gerry[_5_] Excel Programming 2 October 18th 03 02:45 AM


All times are GMT +1. The time now is 11:30 PM.

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

About Us

"It's about Microsoft Excel"