View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 271
Default Userform Listbox subcategories?

Hi,
I was wondering if there was a way to make a value in a listbox - not
selectable.

Example. I have 2 types of forms--Property Coverage, Liability Coverage
I want my Listbox to look like this (the [ ] are the checkboxes that I
enabled in Listbox.ListStyle fmListStyleOption)

Property Coverage----
[ ] Form #PC001
[ ] Form #PC002
[ ] Form #PC003
Liability Coverage----
[ ] Form #LC001
[ ] Form #LC002
[ ] Form #LC003

Of course the list items "Property Coverage---" and "Liability Coverage----"
are just category dividers, and should not be selected (nor should it have a
checkbox next to it either). I have seen some web sites that have this; and
when users click on the categories, all sub-items are added, but I do not
want to enable this option for my users (I want them to make sure they know
exactly which forms they're selecting, and not blindly selecting all).

I'm also incorporating a 2nd Listbox, and passing the selected values over
to the 2nd Listbox (this is common seen in forms with 4 buttons that
represent MoveItemLeft, MoveAllLeft, MoveItemRight, MoveAllRight), in case
this information is needed.

Please help as soon as possible.

Thank you in advance!