M
mowen
Hi
I try to use the procedure to http://www.cpearson.com/excel/ontime.htm
Here are the code, but I get error message right away. Can some on
help me?
I want to run this every 2 minutes only on this workbook and save as
html files.
Sub StartTimer()
Public RunWhen As Double
Public Const cRunIntervalSeconds = 120 ' two minutes
Public Const cRunWhat = "The_Sub"
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
schedule:=True
End Sub
Sub The_Sub()
'
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"D:\Documents and Settings\Rune\My Documents\M
Webs\myweb\public_html\Resultatliste.htm" _
, FileFormat:=xlHtml, ReadOnlyRecommended:=False
CreateBackup:=False
'
StartTimer
End Sub
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"D:\Documents and Settings\Rune\My Documents\M
Webs\myweb\public_html\Resultatliste.htm" _
, FileFormat:=xlHtml, ReadOnlyRecommended:=False
CreateBackup:=False
End Sub
regards
Run
I try to use the procedure to http://www.cpearson.com/excel/ontime.htm
Here are the code, but I get error message right away. Can some on
help me?
I want to run this every 2 minutes only on this workbook and save as
html files.
Sub StartTimer()
Public RunWhen As Double
Public Const cRunIntervalSeconds = 120 ' two minutes
Public Const cRunWhat = "The_Sub"
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
schedule:=True
End Sub
Sub The_Sub()
'
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"D:\Documents and Settings\Rune\My Documents\M
Webs\myweb\public_html\Resultatliste.htm" _
, FileFormat:=xlHtml, ReadOnlyRecommended:=False
CreateBackup:=False
'
StartTimer
End Sub
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"D:\Documents and Settings\Rune\My Documents\M
Webs\myweb\public_html\Resultatliste.htm" _
, FileFormat:=xlHtml, ReadOnlyRecommended:=False
CreateBackup:=False
End Sub
regards
Run