Hi, let me start off by saying by saying that I know pretty much nothing about how to do this. I know enough to figure most things out but to start from scratch not so much.
As a note I am using Excel 97. Saving the file as .xls
The problem I am having is I am running a web query which is this:
http://72.95.125.72/cgi-bin/schoolcl...-clinton-essex
This works perfectly fine. What I was trying to accomplish was to set up an autosave in VB in a model which is this:
Option Explicit
Public RunTime
Sub StartTimer()
RunTime = Now + #12:01:05 AM#
Application.OnTime RunTime, "SaveBook", schedule:=True
End Sub
Sub SaveBook()
ActiveWorkbook.Save
StartTimer
End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime RunTime, "SaveBook", schedule:=False
End Sub
In the workbook is this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
StopTimer
End Sub
Private Sub Workbook_Open()
StartTimer
End Sub
This seems to work fine as well. It automatically overwrites the files which is great.
This is the problem that seems to occur and it is totally random. Every once in a while a pop up will come up and say "This action will cancel a pending refresh data command. Continue."
It basically stops every thing until I hit ok and then it is fine.
What I need it to do is read the web query every minute and autosave every minute or two minutes. Is there away to do this without running into any errors.
Thanks
Shaun
Bookmarks