Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to save file 2

Status
Not open for further replies.

Rybrookar

Technical User
Jun 2, 2007
27
GB
Good afternoon.

I need a macro that will save a file every 20 minutes without relying on the autosave feature.

I have a save macro. How do I make this run every 20 minutes?

As always thanks,for reading this and any help will be gratefully accepted.
 




Hi,

Look at the OnTime Method.

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
Hi Skip - thanks for the tip. I tried the following. Please note that I've not attempted to get anmything like this running before so mistakes are likely.

Sub timelimit()
Application.OnTime Now + TimeValue("00:00:15"), "timetosave"
End Sub

I put 15 secs in just to test it but it didn't work.

Do I have to put it somewhere special (Thisworkbook for instance)



Thanks again.
 
Did you execute the timelimit procedure ?
Do you have a procedure named timetosave ?
Please, define but it didn't work
Any error message ? Computer crash ? Unexpected behaviour ? ... ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PHV.

Yes I have a procedure called "timetosave"

I need the timelimit procedure to run by itself, after the defined time limit (15 secs)

No crash or anything dramtic - it just didn't run the procedure after 15 seconds.


Thanks

 
Again, Did you execute the timelimit procedure ?
 
I've manually checked that the procedure works by running the macro for timelimit. It works.

Thanks

 
I've run the procedure manually a few time and all of a sudden it's started to work.

Thnaks for the help - much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top