I have a problem with copying data. I have a subform shown as datasheet with 8 columns and dynamic number of rows. I have a code, that if you select a cell in a datasheet and press button it copies that row to ListBox. But i do not know how to make a loop that will copy all the rows (or couple selected) to the list box. If more than one row is selected only the 1st one is copied.
Private Sub Command_Click()
Dim item(1 To 8) As String
With frmPresentationList
item(1) = ![Col1]
item(2) = ![Col2]
item(3) = ![Col3]
item(4) = ![Col4]
item(5) = ![Col5]
item(6) = ![Col6]
item(7) = ![Co87]
item(8) = ![Col1]
End With
With Me.selectedItems
.AddItem Join(item, ";")
End With
End Sub
Thank you!