I have a multi selection listbox that has 6 columns located on the "Form" worksheet. Trying to extract the data from the selected lines (and all columns for the selected line) and copy to another worksheet (ExtractedData). My code so far only works to extract the multiple selections for the first column. Not sure how to have it include all columns. Ideally would like to have the six columns to be extracted and placed in separate cells on the ExtractedData worksheet. Here is what I have so far:
Sheets("Form").Select
SelCnt = 0
With Worksheets("Form").ListBox3
For i = 0 To .ListCount - 1
If .Selected(i) Then
SelCnt = SelCnt + 1
ReDim Preserve UserSels(1 To SelCnt)
UserSels(SelCnt) = .List(i)
End If
Next i
End With
If SelCnt > 0 Then
Worksheets("ExtractedData").Range(A2).Resize(UBound(UserSels)).Value = Application.Transpose(UserSels)
End If
Appreciate any assistance!
Bookmarks