View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Looping through a listbox

On a userform?

Private Sub CommandButton1_Click()
Dim i As Integer
For i = 0 To Me.ListBox1.ListCount - 1
If Me.ListBox1.Selected(i) Then
MsgBox ListBox1.List(i, 0) & " " & ListBox1.List(i, 1)
End If
Next i
End Sub

HTH,
Bernie
MS Excel MVP


"EAB1977" wrote in message
...
Simple question...How do I loop through a multi-select single listbox
with 2 columns?