Hi,

This is driving me nuts, please help!!

I have 5 textboxes on a userform, this is a stock updater from. If my txtQty textbox reads 5, it does add the details 5 times to a spreadsheet called "Log Information".

Problem is I need it to auto increment the serial number colomn based on the quantity textbox. Thus, if I have serial number 100 inserted in my userform and the quantity reads 5 I want all the information to be added to the spreadsheet but the serial number colomn must auto increment each row to the next value. i.e:

Name Serial Number bla bla blaaa
Chris 100
Chris 101
Chris 102
Chris 103....etc.

This is the code I have adding the data to the spreadsheet.

Private Sub btnAdd_Click()
Dim TargetCell As Range
Dim emptyrow As Long

'Unprotect the worksheet
On Error Resume Next
ActiveSheet.Unprotect

If WorksheetFunction.CountIf(Sheets("Inventory List").Columns(3), txtScan.Value) = 1 Then
Set TargetCell = Sheets("Inventory List").Columns(3).Find(txtScan.Value, , xlValues, xlWhole).Offset(0, 4)
TargetCell.Value = TargetCell.Value + (txtQty.Value)
Else
MsgBox "Code not found"
End If
Me.Hide

'Make Sheet "Information Log" Active
Sheets("Information Log").Activate

'Determine EmptyRow
emptyrow = Application.WorksheetFunction.CountA(Range("A:A")) + 1

Cells(emptyrow, 1).Resize(txtQty.Value).Value = txtName.Value
Cells(emptyrow, 2).Resize(txtQty.Value).Value = txtSerial.Value
Cells(emptyrow, 3).Resize(txtQty.Value).Value = txtScan.Value
Cells(emptyrow, 4).Resize(txtQty.Value).Value = txtDate.Value
Cells(emptyrow, 5).Resize(txtQty.Value).Value = "Add"
Cells(emptyrow, 6).Resize(txtQty.Value).Value = txtJob.Value

Application.ScreenUpdating = True

Sheets("Inventory List").Activate

'protect the sheet
On Error Resume Next
ActiveSheet.Protect

End Sub

****Please help****