I have a multicolumn listbox in my userform and I would like to get all the values of the elements which are in the selected row in the listbox.
Here is my userform:
No need to loop the entire list - in order to get the selected item row you can use the ListIndex property. Then you can use the List(Row, Column) property to retreive the data, as in the examples by @DragonSamu and @user3598756:
'***** Verify that a row is selected first
If ListBoxResultatFind.ListIndex > -1 And ListBoxResultatFind.Selected(ListBoxResultatFind.ListIndex) Then
'***** Use the data - in my example only columns 2 & 3 are used
MsgBox ListBoxResultatFind.List(ListBoxResultatFind.ListIndex, 1) & ":" & ListBoxResultatFind.List(ListBoxResultatFind.ListIndex, 2)
End If