O
Ozgur Pars
Hi,
this code works fine when I open it the workbook.
However the ecxel workbook is on a common drive when a different user opens
the workbook the code does not work. It seems like there is something wrong
with the trigering of it. Couldn't figure out the problem.
Any help would be appreciated...thanks,
Ozgur
Under ThisWorkbook...
Private Sub Workbook_Open()
Call StartTimer
End Sub
Module1...
Public RunWhen As Double
Public Const cRunIntervalSeconds = 10
Public Const cRunWhat = "The_Sub"
Sub StartTimer()
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, schedule:=True
End Sub
Sub The_Sub()
ActiveWorkbook.UpdateLink Name:="R:\treasury\Fin Analysis\Draft\AAA.xls",
Type:=xlExcelLinks
End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat,
schedule:=False
End Sub
this code works fine when I open it the workbook.
However the ecxel workbook is on a common drive when a different user opens
the workbook the code does not work. It seems like there is something wrong
with the trigering of it. Couldn't figure out the problem.
Any help would be appreciated...thanks,
Ozgur
Under ThisWorkbook...
Private Sub Workbook_Open()
Call StartTimer
End Sub
Module1...
Public RunWhen As Double
Public Const cRunIntervalSeconds = 10
Public Const cRunWhat = "The_Sub"
Sub StartTimer()
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, schedule:=True
End Sub
Sub The_Sub()
ActiveWorkbook.UpdateLink Name:="R:\treasury\Fin Analysis\Draft\AAA.xls",
Type:=xlExcelLinks
End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat,
schedule:=False
End Sub