Hello,
I'm a macro newbie and have simply copied this macro to accomplish the task of timing the completion of an excel test.
I would like the start time and stop time to appear at the top of a data range in cell A1 and B1 respectively. Using the code below, the start and stop times appear at the end of the data range (in column A and B).
How can I fix this macro to accomplish my objective?
Thank you.
Brandy
Private Sub CommandButton1_Click()
lngCol = IIf(CommandButton1.Caption = "Stop", 2, 1)
lngRow = ActiveSheet.Cells(Rows.Count, lngCol).End(xlUp).Row + 1
Cells(lngRow, lngCol) = Now()
CommandButton1.Caption = IIf(CommandButton1.Caption = "Stop", "Start", "Stop")
End Sub
Sorry about not posting my code correctly. It's my first time.
Thanks for your patience and assistance.
That worked perfectly! Thank you very much!
Bookmarks