After choosing a value from a ComboBox the following code executes. However, it's placing the selected value in column C in the "first blank row". I need the value to be placed in the "first row" even if this row contains values in other cells. By the way, the first row containing data is row 6. My column headers are displayed across row 5.
Private Sub cmdAdd_Click()
'Copy input values to sheet.
Dim RowCount As Long
Dim lRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Test")
lRow = ws.Cells(Rows.count, 1).End(xlUp).Offset(1, 0).Row
With ws
.Cells(lRow, 3).Value = Me.cboCode.Value
End With
'Clear input controls.
Me.cboCode.Value = ""
Thanks!
Bookmarks