ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multiselect ListBox - Active/Inactive Items (https://www.excelbanter.com/excel-programming/344419-multiselect-listbox-active-inactive-items.html)

LCK[_2_]

Multiselect ListBox - Active/Inactive Items
 
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


damorrison[_2_]

Multiselect ListBox - Active/Inactive Items
 
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.


exceluserforeman

Multiselect ListBox - Active/Inactive Items
 
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


=============================
"LCK" wrote:

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




All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com