Multiselect ListBox - Active/Inactive Items

L

LCK

Hi
Is it possible to change the appearance/color of certain items inside a
listbox? To indicate if some items are active.

Example

Listbox:
Item1
Item2
Item3
item4 ---> This are all the possible values

When compared this values with a query, let's say that item3 is
missing, So item3 is showed in the listbox, but can't be selected.

Regards,
LCK
 
D

damorrison

What are you trying to do??
If you are using a range for a list box, the items in that range could
be formulated, and then would not be there.
 
E

exceluserforeman

Hi,

You must have a separate list if you are comparing values to your list.

Use the listindex property to ascertain a match and the listbox click event
to determine the list item clicked.

eg:
dim intNum as integer
intNum=listbox.listindex
if listbox.list(intNum)<>range("A1").value then
msgbox"That item does not exist!",vbexclamation,"Listbox Manager"
end if

see my stuff at:

http://www.geocities.com/excelmarksway

- - mark


=============================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top