I am trying to get excel to run an update every XX seconds.
Sub StartTesting()
Call RunAll_ISP 'this call works
End Sub
Sub macro_timer() 'This sub schedules next run in XX seconds.
Dim ScanInterval
ScanInterval = Format(ThisWorkbook.Sheets("Configuration").Range("B5").Value, "hh:mm:ss")
Application.OnTime Now + TimeValue(ScanInterval), "RunAll_ISP", Schedule:=True ' !this macro call throws error!
End Sub
If I run Start_testing macro, call works. If I run macro_timer macro, it waits desired number of seconds, and then throwsthis error:
Cannot run the macro "C:\location_of_file\filename.xlsm'!RunAll_ISP'. The macro may not be available in this workbook or all macros may be disabled
The settings for macros in the Trust center are set to "Enable VBA macros"
What am I doing wrong?
RunAll_ISPprocedure located? Is it in a standard module? Is it declaredPublic?