abesimpson
04-16-2008, 04:21 PM
I am running the following (3) code to run a macro ( ExportOnTime) every 10 minutes.
Sub Start()
Loop_Time
End Sub
-----------------------------------------
Public dTime As Date
Sub Loop_Time() '<<Set frequency of Account XML export
dTime = Now + TimeValue("00:10:00")
Application.OnTime dTime, "Loop_Time"
Application.ScreenUpdating = False
ExportOnTime '<<Account export timer
End Sub
------------------------------------
Private Sub Workbook_BeforeClose(cancel As Boolean)
Application.OnTime dTime, "XML_Time", , False
End Sub
If I try to exit the spreadsheet using the small x I get an error message on "Application.OnTime dTime, "XML_Time", , False". As I never stop the macro before I exit the spreadsheet I am wondering if eliminating this
item will cause me some unintended probelm in the long-run?
Sub Start()
Loop_Time
End Sub
-----------------------------------------
Public dTime As Date
Sub Loop_Time() '<<Set frequency of Account XML export
dTime = Now + TimeValue("00:10:00")
Application.OnTime dTime, "Loop_Time"
Application.ScreenUpdating = False
ExportOnTime '<<Account export timer
End Sub
------------------------------------
Private Sub Workbook_BeforeClose(cancel As Boolean)
Application.OnTime dTime, "XML_Time", , False
End Sub
If I try to exit the spreadsheet using the small x I get an error message on "Application.OnTime dTime, "XML_Time", , False". As I never stop the macro before I exit the spreadsheet I am wondering if eliminating this
item will cause me some unintended probelm in the long-run?