Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox filter
Is it possible to restrict access/selection of a listbox item based on some
criteria? For example: Listbox1 Oranges Lemons Apples Grapes Pears I can't filter the list to show only the non-citrus. Therefore all of the fruits show including the Oranges and Lemons. But , is it possible for me to restrict the selection so that the user can only select Apples, Grapes, or Pears? I know I could code it in the command button after the user selects etc. However, I want to cause the restriction within the listbox. Is that possible? GMet |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox filter
Hi GMet
Look here for a possible solution http://www.contextures.com/xlDataVal02.html -- Regards Ron de Bruin http://www.rondebruin.nl "GMet" wrote in message ... Is it possible to restrict access/selection of a listbox item based on some criteria? For example: Listbox1 Oranges Lemons Apples Grapes Pears I can't filter the list to show only the non-citrus. Therefore all of the fruits show including the Oranges and Lemons. But , is it possible for me to restrict the selection so that the user can only select Apples, Grapes, or Pears? I know I could code it in the command button after the user selects etc. However, I want to cause the restriction within the listbox. Is that possible? GMet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox filter
Why not populate the list box at the on click event. You can then, based on
whatever criteria you have selected, populate the list box with only the relevant choices. Citrus fruits for example. "GMet" wrote: Is it possible to restrict access/selection of a listbox item based on some criteria? For example: Listbox1 Oranges Lemons Apples Grapes Pears I can't filter the list to show only the non-citrus. Therefore all of the fruits show including the Oranges and Lemons. But , is it possible for me to restrict the selection so that the user can only select Apples, Grapes, or Pears? I know I could code it in the command button after the user selects etc. However, I want to cause the restriction within the listbox. Is that possible? GMet |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox filter
Sorry not the on click. More like the on change event and form initailze
events. The list will change dynamically depending on the criteria... "GMet" wrote: Is it possible to restrict access/selection of a listbox item based on some criteria? For example: Listbox1 Oranges Lemons Apples Grapes Pears I can't filter the list to show only the non-citrus. Therefore all of the fruits show including the Oranges and Lemons. But , is it possible for me to restrict the selection so that the user can only select Apples, Grapes, or Pears? I know I could code it in the command button after the user selects etc. However, I want to cause the restriction within the listbox. Is that possible? GMet |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox filter
Rebuild the list to show only the selections that are applicable.
-- Regards, Tom Ogilvy "GMet" wrote in message ... Is it possible to restrict access/selection of a listbox item based on some criteria? For example: Listbox1 Oranges Lemons Apples Grapes Pears I can't filter the list to show only the non-citrus. Therefore all of the fruits show including the Oranges and Lemons. But , is it possible for me to restrict the selection so that the user can only select Apples, Grapes, or Pears? I know I could code it in the command button after the user selects etc. However, I want to cause the restriction within the listbox. Is that possible? GMet |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox filter
OK - Good thoughts. The rowsource is currently set to a predefined range in
one of the workbook tabs. I think I may change that. I could create an array (aMyFruits) based on the criteria and then set MyForm.ListBox1.List = aMyFruits GMet "GMet" wrote in message ... Is it possible to restrict access/selection of a listbox item based on some criteria? For example: Listbox1 Oranges Lemons Apples Grapes Pears I can't filter the list to show only the non-citrus. Therefore all of the fruits show including the Oranges and Lemons. But , is it possible for me to restrict the selection so that the user can only select Apples, Grapes, or Pears? I know I could code it in the command button after the user selects etc. However, I want to cause the restriction within the listbox. Is that possible? GMet |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to filter listbox data in a form? | Excel Discussion (Misc queries) | |||
Setting and filter Listbox data | Excel Discussion (Misc queries) | |||
Filter Listbox in user form | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Is refreshing listbox rowsource in listbox click event possible? | Excel Programming |