Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
MultiSelect Listbox (Forms Toolbar)
I am using a list box from the Forms Toolbar (i.e. NOT the
ActiveX one from the Control Toolbox). However I can find no way, either through Excel itself or through VBA code, to find out which items are selected if the list box is set to "Multiple" or "Extend" mode. Extensive searches on Google and the Microsoft site have come up with nothing. Is this not possible to do? And if not, then why is the option given to set the list box to anything other than "Single" select mode? Thank you muchly to anyone who manages to reduce my increasing insanity over this issue. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
MultiSelect Listbox (Forms Toolbar)
I think you'll have to use VBA to get all the selected items.
I put a Button from the Forms toolbar and assigned this macro to that button: Option Explicit Sub btnClick() Dim iCtr As Long With Worksheets("sheet1").ListBoxes("list box 1") For iCtr = 1 To .ListCount If .Selected(iCtr) Then MsgBox .List(iCtr) End If Next iCtr End With End Sub Ryan Holmes wrote: I am using a list box from the Forms Toolbar (i.e. NOT the ActiveX one from the Control Toolbox). However I can find no way, either through Excel itself or through VBA code, to find out which items are selected if the list box is set to "Multiple" or "Extend" mode. Extensive searches on Google and the Microsoft site have come up with nothing. Is this not possible to do? And if not, then why is the option given to set the list box to anything other than "Single" select mode? Thank you muchly to anyone who manages to reduce my increasing insanity over this issue. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiselect Listbox use | Excel Discussion (Misc queries) | |||
Multiselect listbox selection question | Excel Programming | |||
MultiSelect ListBox in Excel | Excel Programming | |||
Excel VBA-Looping though MultiSelect on ListBox | Excel Programming | |||
multiselect listbox | Excel Programming |