This will copy the entire row from sheet1 to sheet2
Private Sub CommandButton1_Click()
Dim i As Long
Dim a As Long
a = 2
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then
Sheet1.Range(ListBox1.RowSource).Cells(1, 1).Offset(i).EntireRow.Copy
Sheet2.Cells(a, 1).PasteSpecial xlPasteValues
a = a + 1
End If
Next i
End Sub
This will copy the first 3 columns only
Private Sub CommandButton1_Click()
Dim i As Long
Dim a As Long
a = 2
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then
Sheet1.Range(ListBox1.RowSource).Cells(1, 1).Offset(i).Resize(1, 3).Copy
Sheet2.Cells(a, 1).PasteSpecial xlPasteValues
a = a + 1
End If
Next i
End Sub
If you want the records to append rather than start in row to then include
a = Sheet2.Cells(Sheet2.Rows.Count, 1).End(xlUp).Row
If a = 1 Then
' add header
a = 2
Else
a = a + 1
End If
Bookmarks