Macro to Save As Backup File or Create a Pop Up to save File

kdsanderson30

New Member
Joined
Jun 12, 2014
Messages
17
I am not GREAT at Macros, so I will try and explain what I need the best I can.

We have a workbook that has a macro already with a Live Clock that calculates the job times etc. It is on a Server for remote access and used by many people 1 at a time. I look in the file at the data to send intervention emails regarding the times etc. The problem, is that the user does not SAVE the file but every couple of hours so I am not seeing live data. We cannot force a save without a pop up of sometimes, which would be the best bet, but I am unsure how to do that.

Another option is to Autosave a backup file every so many minutes that I could view remotely and use to send the intervention emails without disturbing their copy. Any ideas?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
place in a normal module this code

Code:
Public dTime As Date
 
Sub AutoSaveAs()
    dTime = Time + TimeValue("00:05:00")
    With Application
        .OnTime dTime, "AutoSaveAs"
        .EnableEvents = False
        .DisplayAlerts = False
        ThisWorkbook.SaveAs Filename:=ActiveWorkbook.Path & "\Backup " & ActiveWorkbook.Name
        .EnableEvents = True
    End With
End Sub

and in ThisWorkbook Module this code

Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.OnTime dTime, "AutoSaveAs", , False
End Sub
 
Private Sub Workbook_Open()
    dTime = Time + TimeValue("00:05:00")
    Application.OnTime dTime, "AutoSaveAs"
End Sub

it will save a backup file (every 5 mins) of your original at the same place only with Backup in front of the filename
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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