Hi guys,
I have written a little macro to repeat a task within a certain time in Excel. If I open 2 Excel files in the same time, then so error would happen. Even I close the Excel file with macro, there is still a message asking me whether Enable or Disable the marco...
So I think that must be related to the OnTime function. Can anyone help??
Thanks
Below is my code:
==============
Sub Refresher()
nextrun = Now + TimeValue("00:00:45")
Application.OnTime nextrun, "refresher"
Call URL_Post_Query
End Sub
Sub URL_Post_Query()
...
...
End Sub
==============
I have written a little macro to repeat a task within a certain time in Excel. If I open 2 Excel files in the same time, then so error would happen. Even I close the Excel file with macro, there is still a message asking me whether Enable or Disable the marco...
So I think that must be related to the OnTime function. Can anyone help??
Thanks
Below is my code:
==============
Sub Refresher()
nextrun = Now + TimeValue("00:00:45")
Application.OnTime nextrun, "refresher"
Call URL_Post_Query
End Sub
Sub URL_Post_Query()
...
...
End Sub
==============