Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default multiple selection in combo box

Hello,
I'd like to use a combo box or drop-down list for selecting from a list.
However, I need to be able to select multiple items from the list. Is there a
way to set this up (e.g. hold the ctrl key and select)?

thank you
Jen
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default multiple selection in combo box

How about using a listbox from the control toolbox toolbar and a commandbutton
from that same toolbar.

Then you can use code like this to retrieve the selected items from the listbox:

Option Explicit
Private Sub CommandButton1_Click()

Dim iCtr As Long
Dim DestCell As Range

Set DestCell = Me.Range("a2")

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

End Sub

Double click on the commandbutton and you'll see where this code goes.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

jen_writer wrote:

Hello,
I'd like to use a combo box or drop-down list for selecting from a list.
However, I need to be able to select multiple items from the list. Is there a
way to set this up (e.g. hold the ctrl key and select)?

thank you
Jen


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default multiple selection in combo box

Debra Dalgleish has a sample workbook with a combo-box that allows multiple
selections.

DV0017 - Select Multiple Items from Dropdown List-- Select multiple items from a
dropdown list; an event macro stores selections in adjacent cell, or in same
cell.

http://www.contextures.on.ca/excelfiles.html#DataVal


Gord Dibben MS Excel MVP

On Fri, 19 Jan 2007 12:15:26 -0800, jen_writer
wrote:

Hello,
I'd like to use a combo box or drop-down list for selecting from a list.
However, I need to be able to select multiple items from the list. Is there a
way to set this up (e.g. hold the ctrl key and select)?

thank you
Jen


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
[pivottables] multiple table selection fields update in one click... [email protected] Excel Discussion (Misc queries) 1 September 22nd 06 02:42 AM
How to allow multiple selection capability in excel drop down lis. WritingAcademy Excel Discussion (Misc queries) 1 March 9th 06 12:27 AM
Selection of multiple values for pivot table field Michael Glenn Excel Discussion (Misc queries) 0 February 23rd 06 02:11 PM
multiple pivots updated with selection in one table BorisS Excel Worksheet Functions 2 June 15th 05 07:26 PM
connecting combo boxes to yield data in another cell. TxN8tv Excel Discussion (Misc queries) 0 March 14th 05 04:07 PM


All times are GMT +1. The time now is 07:47 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"