#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default LISTBOX'S

hello

3 things

is it possible to sort the contents of a listbox
is it possible to prevent items in a listbox being selected

can you add items to a label in the same way as a listbox


many thanks
Greg

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default LISTBOX'S

Greg,

is it possible to sort the contents of a listbox


There is no built-in way to sort a list box.

is it possible to prevent items in a listbox being selected


You can disable the entire list box with
ListBox1.Enabled = False
but you cannot disable individual items in the list.

can you add items to a label in the same way as a listbox


I'm not sure what you mean, but I think the answer would be "no".

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"GREGORY" wrote in message
...
hello

3 things

is it possible to sort the contents of a listbox
is it possible to prevent items in a listbox being selected

can you add items to a label in the same way as a listbox


many thanks
Greg



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default LISTBOX'S

ok thank you.
-----Original Message-----
Greg,

is it possible to sort the contents of a listbox


There is no built-in way to sort a list box.

is it possible to prevent items in a listbox being

selected

You can disable the entire list box with
ListBox1.Enabled = False
but you cannot disable individual items in the list.

can you add items to a label in the same way as a

listbox

I'm not sure what you mean, but I think the answer would

be "no".

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"GREGORY" wrote in

message
...
hello

3 things

is it possible to sort the contents of a listbox
is it possible to prevent items in a listbox being

selected

can you add items to a label in the same way as a

listbox


many thanks
Greg



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default LISTBOX'S


-----Original Message-----
ok thank you.
-----Original Message-----
Greg,

is it possible to sort the contents of a listbox


There is no built-in way to sort a list box.


BUT
You can simulate by changing the data content as required
1.January
2.February etc


is it possible to prevent items in a listbox being

selected

You can disable the entire list box with
ListBox1.Enabled = False
but you cannot disable individual items in the list.


You could do 2 things
Reload the list box with the items that you want enabled
OR
Do something like (I have just implemented this)
Preceed the item with * and if selected pop up with a
message saying 'Items beginning * cannot be selected'
perhaps a bit problematic with multiple selections but
just reject all of them and get the user to start again

can you add items to a label in the same way as a

listbox

I'm not sure what you mean, but I think the answer would

be "no".

Unless you want the label to be conditional upon something
else. AS you cannot go to a dropdown label it sounds like
you just want to change the label. Just program it in by
changing the caption depending on what is required. Labels
cannot be selected by users so it has to be done
programmatically

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"GREGORY" wrote in

message
...
hello

3 things

is it possible to sort the contents of a listbox
is it possible to prevent items in a listbox being

selected

can you add items to a label in the same way as a

listbox


many thanks
Greg



.

.

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



All times are GMT +1. The time now is 10:12 AM.

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"