Links to Update every 10 seconds...

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
 
M

Michael

Rather than using the drive name use the server name like so:
ActiveWorkbook.UpdateLink Name:="\\servernamegoeshere\treasury\Fin
Analysis\Draft\AAA.xls",

That should solve the problem as long as the other users have access to the
Treasury anf Fin Analysis folders.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top