Updating Shared Workbook

G

Guest

OK... I got a shared workbook that 3 different people update every 30 minutes
or so... My question is: I set the actual shared workbook/advanced properties
to automatically update every 5 minutes but every time someone opens the
workbook, they have to manually go into the Tools/SharedWorkbook/Advanced and
change the setting. Is there a way to do this automatically so that anyone
who opens this particular workbook, the Tools/SharedWorkbook/Advanced will
automatically changed to Update every 5 minutes?
 
B

blkoehler

You can use VBA code to set your own timer. The following code will
save every 5 minutes:

Dim NextTime As Date

Sub Auto_Open()
NextTime = Now + TimeValue("0:05:00") ' in 5 minutes
Application.OnTime NextTime, "SaveMe"
End Sub

Sub SaveMe()
ThisWorkbook.Save
NextTime = Now + TimeValue("0:05:00") ' in 5 minutes
Application.OnTime NextTime, "SaveMe"
End Sub

Sub Auto_Close()
If NextTime<>0 Then
Application.OnTime NextTime, "SaveMe", schedule:=False
NextTime = 0
End If
End Sub


Hope this helps.

Brandon Koehler
Analytical Consultant
(e-mail address removed)
 

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