Auto Save Backup Every 15 Minutes
May 22, 2012I am looking for some code to auto save my workbook into this location every 15 min,
View 1 RepliesI am looking for some code to auto save my workbook into this location every 15 min,
View 1 RepliesI have a shared document used by as many as 11 different people. right now I go into a document and save a copy each week in case one of them messes it up.
just curious if that can be done automatically.
I have found some posts about "Auto Saving" and Dave pretty much frowns upon that. But the program I use (via ODBC), for some reason doesn't see the changes I make unless the file is saved. I have it auto-saving right now, but was thinking, maybe it is better to export a copy.
What I would need, is the ability to take my current workbook and export it to a new file (overwriting that same file each time), and do this based on time or (even better) on a change in the data. My current workbook is set to pull from other CSV files, scraping our website, etc., and then I use Excel to format the data the way I want.
It would be cool, if I could export two versions each time too... one that would be like a archive of what the file was like when it changed, the other would be the one that just gets overwritten each time.
Love this site...tons of info...but dang am I not smart at this stuff. Half the time, I don't even get where to put the code...worksheet, module, workbook?
I call the macro below from a Workbook_BeforeClose sub; however, if the user has not saved changes before they hit the close then the Sub SaveFile runs and then after the backup save they are then asked do you want to save changes.
I initially had this sub run with Workbook_BeforeSave, but I don't really want to run this everytime the user selects save.
Any ideas on how to how the save changes first and then the backup?
I was able to find the coding that I needed for being able to have a backup of my file. So when I save a workbook and close I also get a backup copy in another folder that is dated. But I am having problems getting the code to work. Probably because I do not understand it correctly. Here it is.
Option Explicit
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.SaveCopyAs "C:Documents and SettingsTeacherDesktopTEST" & _
Format( Date, "yyyy-mm-dd") & " - " & ThisWorkbook. Name
End Sub
Where it has, ThisWorkbook.Name, do I put the name of the workbook? Not sure.
I need a macro that will create a backup copy of excel file in other folder when an original file is closing.
View 6 Replies View RelatedI want to make a macro that will generate a backup copy each time the Excel file is opened. I premade a backup and recorded the following macro, placing it in the sub here:
Code:
Private Sub Workbook_Open()
ChDir "C:Usersmy.selfDesktop"
ActiveWorkbook.SaveAs Filename:= _
"C:Usersmy.selfDesktopDaily Backup.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled,_ CreateBackup:=False
ActiveWorkbook.Close
End Sub
names have been changed to protect the innocent. But now either putting in to repoen the original working excel or manually opening it puts me in an infinite loop of backing up. The probelm seems to be that to make a copy it is making the open workbook the backup. So two part question here:
1. Can I make a copy under the same name automatically when the file is opened while staying in the current one?
Example: open the Excel file "Working Copy", which makes a mirror file called "Backup Copy", but stay in "Working Copy".
2. From what I did manage to do, I notice every time it asks if I want to overwrite. I chose "Yes" when recording the macro but this doesn't seem to get captured. can I make it automatically yes without being asked?
I need to save an excel workbook when a "backup" button is pressed to a folder named "Backups". I want the name to be the "date" (09/07/2013) only and I want it to automatically overwrite anything previously saved for that day.
Book1.xlsm
At work we use a spreedsheet to control our holidays. The problem we are having is the file is stored on a network and some people are opening the file and not closeing it once done with, this is locking out others from using it.
Is there any VBA code that will close the file, if not used in say 5 mins
I've created a MsgBox that if you do not respond or Click on it within a set time it will either disappear or perform an action upon no selection. It works great....IF it’s the only excel workbook open. If there is a second workbook open (Even if the second WB is minimized) then the MsgBox just stays up and the "Timer" no longer works. My Code is as Follows:
Sub TimedMsgBox()
Dim Box As Object
Dim varResponse As Variant
Dim Res As Long
Set Box = CreateObject("WScript.Shell")
varResponse = Box.Popup(Text:="Which button will you click?", secondstowait:=5, Title:="Click Me!", Type:=vbYesNoCancel)
If varResponse = vbYes Then
MsgBox "You clicked Yes"
ElseIf varResponse = vbNo Then
MsgBox "You clicked No"
ElseIf varResponse = vbCancel Then
MsgBox "You clicked Cancel"
ElseIf varResponse = -1 Then
Res = Box.Popup(Text:="What? Do you not like me?", secondstowait:=5, Title:="You Didn't click Me!", Type:=vbOK)
End If
End Sub
Macro to save the worksheet every 5min
A macros is needed to:
1. save the worksheet under the same name
(& variation: under diff name - e.g. quotes_HHMM.xls ,
where HH is hour and MM is minutes of the time the file is saved)
2. every 5 minutes (the file is opened at 9AM and closed at 6PM manually)
I have a file, where the financial data is streamed in from Reuters.
I have excel file in my desktop and doing some report generation with that. i need to open that excel file for every 30minutes.
View 5 Replies View RelatedI want to write a piece of code that will automatically do a SaveAs on the workbook I'm using, say every hour, and add the current system date and time to the filename every time.
View 4 Replies View RelatedI have a range that refer to an external data. This external data is refreshed every one minute. So the data is changing every one minute. I need to copy the content of one fix cell in that range into another cell every one minute, each time copy to a different cell. Example: cell A1 has the content that refer to an external data. Cell A1 is updated every one minute. At first A1= 100, I need it to be copied to cell B1 (so B1=100); one minute later, A1=101, I need it to be copied to B2 (so B2=101) and so on.
View 4 Replies View RelatedI have an excel file stored on a network drive for the purpose of information sharing. (File protected with a password)
But some the guys leave the file open for quiet long time and hence I cannot open the file for updating the data.
-I need to have a macro that runs every 5 minutes and displays an alert message saying "Please close the File" as long as the file is kept open.
-A second macro with a modified version of the above to close the file automatically after 5 minutes from file opening time after showing an alert message "You cannot leave the File Open, File is Closed Automatically!"
The below seems to work but I'm wondering if there might be a better way. I'm trying to keep an ongoing up-to- date and accurate time. my code is as follows:
Private Sub Workbook_Open() ' placed inside thisworkbook
Call TimeUp
End Sub
Sub UpdateTime() ' placed in module
If Range("A4") = TimeValue("00:00:00") Then
Application.OnTime Now + TimeValue("00:01:00"), "TimeUp"
Else
UpdateTime2
End If
End Sub
Sub TimeUp()
[a1] = Time
UpdateTime
End Sub
Sub UpdateTime2()
[a1] = Time
Application.OnTime Now + Range("A4").Value, "TimeUp"
End Sub
Does anyone know if there is any way to improve the Code or formulas within the Cells?
I am a truck driver and keep a record of my loading times when I am loading and unloading. At the end of a trip i transfer all the data to my computer, then "auto sum" the "HOURS" and the "MINUTES" columns. At the bottom of ech trip I end up with figures, lets say 32 (hours) in column "J" and 303 (minutes) in column "K".
Now 303 minutes is {5 hours and 3 minutes}. Now we all know that mathematically we can work out that {3} minutes is 0.05 of 1 hour and that would make the total time worked 32 (hours) + 5 (hours(from the minutes)) + the last 3 minutes and the total is 37 hours and 3 minutes.
What I am in need of is a formula that will take the hours in column "J" add the hours from column "K", leaving the minutes to be converted to 0.05, giving me a total in cell "M29" that can then be multiplied by the wage rate in cell "M30", giving me an amount that I should be paid in cell "M31"
I have a spread sheet with a colum showing average time to complete a task. This is currently shown as Days:Hours:Minutes:Seconds (4:19:33:19). I meed it to be shown purely as minutes, or at least as hours and minutes.
View 4 Replies View RelatedI have a formula which will calculate the number of hours and minutes between two military times. I would like it to calculate the total number of minutes instead of hours and minutes. I have uploaded a small example of what i have so far.
View 3 Replies View RelatedCurrently I have an excel form that I am working on. I just figured out how to get it to open when I open the workbook. I am wondering is there code out there that will prompt excel to auto save the worksheet that the form writes to when the "OK" button on my form is clicked. I want to be able to save the data without having to rely on the user to remember to save everytime entry is complete. if there is a code for this function, where would I place it in my code listing?
View 2 Replies View RelatedIs there a way to have excel automatically save the workbook every 5 minutes or so? I'm not talking about the backup option (tools-options-save) I mean do a hard save?
Or would this warrant a timed VBA code? If so, can someone build me one quickly? I'm kinda in a time crunch - sorry for last minute notice. Co-worker just deleted 8 hours of work bec "she didn't" know to save it....
I am using one spread sheet to store date that gets updated throughout the day and am pulling information form that sheet to another file. I need to save it to get the current data and I don't want to rely on the person entering data to remember to save. The sheet I want to save is called Log.
View 8 Replies View RelatedI have attached a code that prompt the user for a store # then that number would automatically copy to cell A1 and at the same time it saves the file name as what is copied to A1.
This is a good code but the problem is when the file is closed and re-open, it prompts the user again for a store number and when you select 'Cancel' it replaces the store# already stored in cell A1.
What I am trying to accomplish:
1- When the file is re-opened, it should detect cell A1, if it's empty prompt user for store #, if it's not empty skip the prompt screen.
Private Sub Workbook_Open()
var1 = InputBox("store#")
Range("a1") = var1
var1_filename = var1 & ".xls"
ActiveWorkbook.SaveAs Filename:=var1_filename
End Sub
i have a workbook that pulls data from 7 other workbooks based off of 3 criteria. In 6 of the 7 workbooks there are 6 sheets and in the last sheet there are 15sheet. All the sheets are used on different computers and currently the member who use these sheets cant remember to save them so the main workbook can pull the information. So I was hoping for a VB code to do the save for them after they enter any data in the range of A1:J50.
Then for the main work book i was hoping for a VB code to auto update after entering the 3 criteria. I have a marco made but it takes awhile to do it. First it saves the sheet, then pulls the information, then refreshes some pivot table, then populates into the proper cells.
I have only one workbook in which I would like to enable auto-save. Hence, I do not need the auto-save add-in, which I've already tried. Is there some VBA code that can replicate the auto-save add-in for only one workbook? Also, I would like the default auto-save settings to save every 1 minute and NOT prompt for the save. This workbook gets completely new data every few seconds through a DDE Link, so having it save without prompting would be fine. I liked the auto-save add-in, but it reset to default settings every time the workbook was closed, I'd like to keep the same settings every time the workbook is opened.
View 5 Replies View RelatedI have code to print an invoice to PDF, here is the printing part.
Sub Macro3()
Application.ActivePrinter = "Adobe PDF on Ne05:"
ActiveWindow.Worksheets("Sheet1").PrintOut From:=1, To:=1, Copies:=1, ActivePrinter:="Adobe PDF on Ne05:", Collate:=True
End Sub
When the code runs a box appears asking the user to save the PDF as a filename and the user never saves the correct invoice filename. Is there a way to suprees the box and automatically save as a predetermined name say "Invoice 0012 27-01-01"
i want to have a macro which will autosave the worksheet/ book automatically every minute so the user doesnt have to keep clicking file and save.
View 9 Replies View Relatedhttp://www.excelforum.com/excel-programming/641622-auto-save-to-a-file-via-macro-or-program.html
i have a macro that saves specifically to a folder
that contains a job number and customer name
ie \serverjob_fileJ5212 - Sumnerdocs
i have encountered a problem where the name is spelt differently
the folder is actually called j5212 - sumner
but if i type j5212 - summer it wont obviously save and comes up with an error because of the spelling mistake
despite my folder being as it is
is there anyway i can get this to save to the folder with just the j5212??
I have a workbook.
I would like to automate with code the process of extracting one worksheet from that workbook, and saving it as a separate workbook, with a file name equal to the text value of a cell (date formatted dd-mm-yy) from within that workbook. (ie d1="10/07/08" save file with one worksheet 10-07-08.xls)
I close an existing excel file I need to automatically save it to another folder as the same name. I don't want any prompts or save as boxes to appear when this happens.
I need to do this as I use the file all the time, but need to save it on to a network where others can view it.