Force Save *resolved*

thorpyuk

Well-known Member
Joined
Mar 14, 2006
Messages
1,453
Hi guys,

I havent really thought this through, but I have an excel sheet acting as a temporary Contact management system.....

Anyway, I want the user to save the spreadsheet before he/she logs off, and I think this needs to be a 'force save' rather than an option, just in case the user accidentally clicks on 'do not save'.

Also, it would be really usefull to either prompt to save, or automatically save at intervals of maybe 30 mins or so.....

Does anyone have anything similar to the above?

Thanks!
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

ADAMC

Well-known Member
Joined
Mar 20, 2007
Messages
1,166
Have it save in a before close event?

Private Sub WorkBook_Close()
Application.displayalerts = false
ActiveWorkbook.save
Application.displayalerts = true
End Sub
Or something like:


Place this code in the ThisWorkbook module
Private Sub Workbook_Open()
'Set a timer to run the SaveMyWorkbook procedure in 15 mins
Application.OnTime Now + TimeValue("00:15:00"), "SaveMyBook"

End Sub

Place this code in a standard module (eg Module1)
Sub SaveMyBook()
'Turn off Excel message alerts
Application.DisplayAlerts = False

'Save this workbook.
ThisWorkbook.Save

'Turn back on alerts
Application.DisplayAlerts = True

'call this procedure again in another 15 mins
Application.OnTime Now + TimeValue("00:15:00"), "SaveMyBook"
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,123,337
Messages
5,601,026
Members
414,422
Latest member
acegreen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top