Hi
I have a table that consists of 3 columns (A, B and C). The data is entered by scanning barcodes into a user form. Into a column A i am scanning name of the machine then Into column B- the name of the operator and into column C-the name of product. I have a code that works for that perfectly however with this code i have always new rows. I would like to avoid increasing the rows by overwriting cells in columns B and C with new information once the machine is repeated.
I.e:
1. Now
Machine Operator Job Clock In
M1 O1 J1 30/09/2013 09:56
M1 O1 J2 30/09/2013 09:57
M2 O2 J3 30/09/2013 09:58

2. Desired

Machine Operator Job Clock In
M1 O1 J2 30/09/2013 09:57
M2 O2 J3 30/09/2013 09:58


My code looks as follow:
Private Sub cmdConfirm_Click()
Dim iRow As Long
Dim ws As Worksheet
Dim fr As Long
Set ws = Worksheets("Sheet1")
iRow = ws.Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1
If Trim(Me.txtmachine.Value) = "" Then
Me.txtmachine.SetFocus
MsgBox "Please enter a machine name"
Exit Sub
End If
If Trim(Me.txtOperator.Value) = "" Then
Me.txtOperator.SetFocus
MsgBox "Please enter an operator name"
Exit Sub
End If
If Trim(Me.txtJob.Value) = "" Then
Me.txtJob.SetFocus
MsgBox "Please enter a job number"
Exit Sub
End If
With ws
.Cells(iRow, 1).Value = Me.txtmachine.Value
.Cells(iRow, 2).Value = Me.txtOperator.Value
.Cells(iRow, 3).Value = Me.txtJob.Value
End With
Me.txtmachine.Value = ""
Me.txtOperator.Value = ""
Me.txtJob.Value = ""
Me.txtmachine.SetFocus
With ws
'enter date and time stamp in record
With .Cells(iRow, 4)
.Value = Now
.NumberFormat = "mm/dd/yyyy hh:mm:ss"
End With

End With
End Sub

Private Sub cmdClose_Click()
Unload Me
End Sub

Could someone help me with my problem? Thanks in advance