Drop-down lists

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I have the system select more than one item (or cell) from a
drop-down list. Different items can be selected from the same list but the
system will not allow me to add more than one.
 
Dropdowns are generally created using Data-Validation. Using this method,
you cannot select multiple options. You'll need a listbox or combobox.

Here's some sample code:
Sub FindItems()

Dim Msg As String, i As Integer
Msg = ""
With TestDialog.ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
Msg = Msg & .List(i) & Chr(13)
End If
Next i
End With
MsgBox Msg, , "Selected items in ListBox1"
End Sub

________________________

**** Hope it helps! ****

~Dreamboat
Excel VBA Certification Coming Soon!
www.VBAExpress.com/training/
********************************
 
Back
Top