You can add the code below to a module, then call the TimeStamp in your
program when needed. Make sure you change the name of the worksheet
("Sheet1") to wherever you want the time stamps to go. Also, change the
Column (currently set to "A").
Each time the TimeStamp is run, it will look for the next available cell in
Column A (on Worksheet "Sheet1") and enter the current date/time value.
Hope that helps.
Dim wkb As Workbook
Dim wks As Worksheet
Dim rng As Range
Set wkb = ThisWorkbook
Set wks = wkb.Worksheets("Sheet1")
' Find last used cell in Column A.
Set rng = wks.Range("A65536").End(xlUp)
' If the last used cell is Row 1 AND is blank, set the time stamp.
If rng.Row = 1 And rng.Value = "" Then
rng.Value = Now()
' Move to the next row down and set the time stamp.
rng.Offset(1, 0).Value = Now()
Set wkb = Nothing
Set wks = Nothing
Set rng = Nothing