This is part of a user form to add data to an existing spreadsheet. The problem i am having is the form will repeatedly overwrite the same line instead of moving onto the next.
Private Sub btnEnter1_Click()
Dim emptyRow As Long
Sheets("Bin Entry").Activate
emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
If Trim(Me.TextBox3.Value) = "" Then
Me.TextBox3.SetFocus
MsgBox "Please enter a SKU number"
Exit Sub
End If
Cells(emptyRow, 1) = TextBox7.Value 'Vendor
Cells(emptyRow, 3) = TextBox2.Value 'Date
Cells(emptyRow, 4) = TextBox4.Value 'Order#
Cells(emptyRow, 5) = TextBox3.Value 'SKU
Cells(emptyRow, 6) = TextBox8.Value 'Vendor#
Cells(emptyRow, 7) = TextBox10.Value 'Description
Cells(emptyRow, 8) = TextBox5.Value 'Qty
Cells(emptyRow, 11) = Val(TextBox9.Text) * Val(TextBox5.Text) 'ExtCost
'clear the data
Unload Me
frmDataEntry1.Show