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!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
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
 
Upvote 0

Forum statistics

Threads
1,213,550
Messages
6,114,265
Members
448,558
Latest member
aivin

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
Back
Top