list boxes

  • Thread starter Thread starter joe powers
  • Start date Start date
J

joe powers

Hi,
I have a list box that allows a user to make multiple
selections. I would like to take the selected rows and
store them in another column on my worksheet so that I can
do vlookups. Does anyone have any ideas on how to
accomplish this?
TIA
 
Joe,

This macro creates a list of the selected items for ListBox1, beginning in
cell G1:

Sub CreateList()
Dim c
Dim t

c = 0
With Sheet1
For t = 0 To .ListBox1.ListCount - 1
If .ListBox1.Selected(t) Then
.Range("G1").Offset(c) = .ListBox1.List(t)
c = c + 1
End If
Next
End With
End Sub

Stan Scott
New York City
 
Back
Top