I want to use an external device to scan and measure voltage. I want to run a scan every 6 hours. The code I used to do that is as follows.
-----------------------------------------------------------------------------------------------------
Private Sub Workbook_Open()
'Runs a voltage scan at 9:00am, 3:00pm, 9:00pm, and 3:00am
Application.OnTime TimeValue("03:00:00"), "Scan34970A"
Application.OnTime TimeValue("09:00:00"), "Scan34970A"
Application.OnTime TimeValue("15:00:00"), "Scan34970A"
Application.OnTime TimeValue("21:00:00"), "Scan34970A"
End Sub
------------------------------------------------------------------------------------------------------
However, when I run the macro I am having the "Scan34970A" fire at times that are undesired. Also the scan will occasionally run several times when the scan is called at the times specified.
How would I get the scan to ALWAYS run only once, and only at the times requested?
Thank you for the support ,
JD
Bookmarks