Auto Save Poem by Alvinzor Flores

Auto Save



If Not ThisWorkbook.Saved Then
If MsgBox('Do you want to save the file before continuing? ', vbYesNo, 'Save? ') = vbYes Then
ThisWorkbook.Save
End If
End If
share improve this question
Asked
Aug 6 '14 at 20: 22

Dawn
1 Edited
Aug 6 '14 at 20: 40

Siddharth Rout
70.2k●8●70●94
1 Answer order by
up vote
0
down vote
You want to add a timer to the workbook. See this thread: VBA Macro On Timer style to run code every set number of seconds, i.e.120 seconds

E.g.

alertTime = Now + TimeValue('00: 05: 00') 'Adds 5 minutes
Application.OnTime alertTime, 'YOUR MACRO SUB'
To summarise:

Add a sub e.g. on Workbook open event that runs the timer running a separate Sub

In the separate Sub add the messagebox and the run the initial sub

Thursday, May 21, 2015
Topic(s) of this poem: art
COMMENTS OF THE POEM
READ THIS POEM IN OTHER LANGUAGES
Close
Error Success