Macro to save workbook

P

puiuluipui

Hi, i need a macro to save a workbook every 2 minutes.
Can this be done?
Thanks!
 
J

Jacob Skaria

--Why dont you use the setting from menu Tools>Options>Save>Settings>'Save
AutoRecover info every'

--A macro would look like the below
Sub AutoSave()
ActiveWorkbook.Save
'OR ThisWorkbook.Save '(as per your requirement)
Application.OnTime Now + TimeSerial(0, 2, 0), "AutoSave"
End Sub

If this post helps click Yes
 
P

puiuluipui

Hi Jacob, is not autosaving the workbook. It's working only if i run the
macro. Can this macro be made to run by itself every 2 minutes?
Thanks!
 
G

Gord Dibben

Version prior to Excel 2002 had a real AutoSave which overwrote the workbook
with a save at specified time intervals. Good or bad feature depending on
how you look at it.

Versions since 2000 use Auto Recovery which only creates a timed but
temporary backup file which is deleted when the workbook is saved or closed
normally.

Auto Recovery is a safety valve in the event of an Excel crash while a
workbook is open.

Jan Karel Pieterse has an addin called AutoSafe
which doen't alert before saving.

http://www.jkp-ads.com/download.asp

(look for AutoSafe.zip)

It doesn't overwrite the existing workbook when it saves. It saves to a
user selectable folder. And when it's done, it either deletes these backups
(or puts them in the recycle bin). And the user can always restore the
backups from the recycle bin.

If you still have access to the AutoSave add-in from Excel 2000 it may work
with 2007................it did work with 2002 and 2003

I can send you the Autosave.xla from XL97 which apparently works under 2007

I know it works for 2002 and 2003 but have not tested for 2007.


Gord Dibben MS Excel MVP
 

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