LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Multiselect Listbox use

You'll need a macro to extract the values.

I'd put a button from that same Forms toolbar right next to the listbox. Then
the user can click that button when they want to extract the values.

Then assign this kind of code to that button:

Option Explicit
Sub testme()

Dim myLB As ListBox
Dim DestCell As Range
Dim iCtr As Long

With ActiveSheet
Set DestCell = .Range("B1")
Set myLB = .ListBoxes("List box 1")
End With

With myLB
'clear out previous entries?
DestCell.Resize(.ListCount, 1).ClearContents

For iCtr = 1 To .ListCount
If .Selected(iCtr) Then
DestCell.Value = .List(iCtr)
Set DestCell = DestCell.Offset(1, 0)
End If
Next iCtr
End With

End Sub



RKS wrote:

Once I multiple select on the listbox created from Forms tool box - how do I
use it ... where do I have the results of multiple selection


--

Dave Peterson
 
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
Listbox Query Again Greg B Excel Discussion (Misc queries) 1 September 16th 05 05:01 PM
Formatting Listbox Hardy03 Excel Discussion (Misc queries) 0 August 4th 05 12:43 PM
Need help with Listbox Lizzie_S Excel Discussion (Misc queries) 3 July 22nd 05 03:42 AM
Help with Excel ActiveX listbox controls programmer123 Excel Discussion (Misc queries) 0 July 7th 05 10:30 PM
multiple columns / rows to be referenced through a listbox Hru48 Excel Discussion (Misc queries) 0 July 4th 05 04:12 PM


All times are GMT +1. The time now is 04:23 PM.

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

About Us

"It's about Microsoft Excel"