If your RTD function is in cell A2, this code will store the value every minute in column C, with a time stamp in column B. Start it by running StoreValue, and stop it by running StopStoring, which can also be called in the before close event of the workbook.
Option Explicit
Dim NextTime As Date
Sub StoreValue()
Dim lRow As Long
Application.EnableEvents = False
With Worksheets("Sheet1")
lRow = .Cells(.Rows.Count, "B").End(xlUp).Row + 1
.Cells(lRow, "B").Value = Now()
.Cells(lRow, "C").Value = .Range("A2").Value
End With
Application.EnableEvents = True
NextTime = Now() + TimeValue("00:01:00")
Application.OnTime NextTime, "StoreValue"
End Sub
Sub StopStoring()
On Error Resume Next
Application.OnTime NextTime, "StoreValue", schedule:=False
End Sub
Bookmarks