Hi All.
Have this problem with a listbox. When I select a item in my listBox (Located in a form) and then execute command to paste it into a table. It is pasting the last item on the list everytime. What am I doing wrong? Do I need to index the list, if so, then how? or is there another fix for this.
This is the code I am using, the ListBox have two columns.
![]()
Private Sub cmdBook_Click() Dim lrDT As Long lrDT = Sheets("Sheet3").Range("A" & Rows.Count).End(xlUp).Row Dim i As Long For i = 0 To Me.ListBox1.ListCount - 1 Sheets("Sheet3").Cells(lrDT + 1, "A") = ListBox1.Column(0, i) Sheets("Sheet3").Cells(lrDT + 1, "B") = ListBox1.Column(1, i) Next i End Sub
Bookmarks