Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiselect Listbox use RKS Excel Discussion (Misc queries) 1 May 12th 06 03:04 PM
Multiselect listbox selection question Paul Mueller Excel Programming 3 June 16th 04 09:25 PM
MultiSelect ListBox in Excel PeteSmith Excel Programming 1 April 20th 04 11:14 AM
Excel VBA-Looping though MultiSelect on ListBox jpendegraft[_3_] Excel Programming 2 February 3rd 04 04:38 PM
multiselect listbox CG Rosén Excel Programming 2 December 28th 03 05:17 PM


All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"