Hi
Below is code attached to a command button on a userform. The userform is used to load data to the worksheet. The data to be entered needs to start on row 4.
The problem I'm running into is when the second entery is keyed is its not moving to the next row, it's overwriting the fist entery
any thoughts why this is happening
Below is code attached to a command button on a userform. The userform is used to load data to the worksheet. The data to be entered needs to start on row 4.
The problem I'm running into is when the second entery is keyed is its not moving to the next row, it's overwriting the fist entery
any thoughts why this is happening
Code:
Private Sub CommandButton1_Click()
Dim iRow As Long
Sheets("BranchTracking").Activate
iRow = Sheets("BranchTracking").Cells(65000, 4).End(xlUp).Offset(1, 0).Row
Cells(iRow, 1).Value = Me.Day.Value
Cells(iRow, 2).Value = Me.Emp.Value
Cells(iRow, 3).Value = Me.Activity.Value
Cells(iRow, 4).Value = Me.Pissued.Value
Cells(iRow, 5).Value = Me.TOut.Value
Cells(iRow, 6).Value = Me.TIn.Value
Cells(iRow, 7).FormulaR1C1 = "=RC[-1]-RC[-2]-RC[-3]"