I want to send the current ListBox value to a list in column U via a Command Button click. The following code works somewhat except that it starts the list after the used cells in the "middle" of column U, rows 36 to 3000 instead at row 2, the first unused row.
Can anyone suggest how to modify the code place list box values starting in the first unused cell in column?
Private Sub CommandButton1_Click()
Dim lngLastRow As Long
Dim lngCol As Long
Dim lngIndex As Long
lngLastRow = Range("U" & Rows.Count).End(xlUp).Row + 1
lngCol = 21
Cells(lngLastRow, lngCol) = ListBox1.Value
End Sub
Part II if I am allowed to request at the same time, is to simultaneously place the value in cell P32 in a list in column V?
Can the above code be modified to place both the current list box value in the first unused cell in a list in column U, while at the same time placing the current value in cell P32 in a list starting at first unused cell in a list in column V.
Any help is greatly appreciated.
Thanks,
Art
Bookmarks