Simple question...How do I loop through a multi-select single listbox with 2 columns?
E EAB1977 Mar 18, 2009 #1 Simple question...How do I loop through a multi-select single listbox with 2 columns?
B Bernie Deitrick Mar 18, 2009 #2 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
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