Backup Copy Of Workbook Macro

Nov 28, 2013

I am using this code to create a backup copy of my workbook:

Code:
Sub DOUGHMON()Dim fname
fname = "C:UsersAndrewDesktopWEEKLY SALES REPORTS" & Format(Now, "dd mmm yy") & ".xlsm"
ThisWorkbook.SaveAs Filename:=fname
End Sub

The only problem with this code is that my current file gets closed and the backup is open. I'm not sure if that is exactly what happens, but when it is done the current file that is open is the copy, and I would like the original file to stay open.

View 1 Replies


ADVERTISEMENT

Making Backup Copy Of Active Workbook While Workbook Is Open

Jun 30, 2014

I run a model in Excel that automatically saves my file every xx iterations. After saving the file I want to make a backup of the file. Tried

[Code] .....

but get a permission denied error message.

I don't want to use .SaveAs as it is a huge file that takes a while to save and SaveAs has a tendency to break links that should not be broken..

View 13 Replies View Related

Save Copy / Backup Of Workbook As Date In Certain Folder

Sep 7, 2013

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

View 2 Replies View Related

Save Backup Of Workbook Before Close

Dec 15, 2009

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?

View 6 Replies View Related

File Backup To Different Folder Location Automatically Whenever Workbook Closed

Feb 10, 2014

1. A workbook is closed

2. In addition to the original workbook being saved, a copy of the workbook with the current date is also saved to the specified location of my choice.

For example

"C:UsersUSER1DesktopBackup Test as of 02-10-14"

3. If a copy of the workbook is already saved with today's date, then overwrite it automatically without prompting the user.

4. All the above happens without any user interaction.

View 8 Replies View Related

Save Backup Copy Before Closing

Aug 18, 2007

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.

View 7 Replies View Related

Linking Copy Onto Hidden Sheet For Backup

Nov 15, 2012

I have a database (attached) that has data entered into the "Progression" sheet. This data is continually updated, and once each row has a section date, I have a macro that moves the data from "Progression" to the "Complete" sheet (and from there, into a specific month sheet). I AM REALLY CONCERNED with data accidentally getting deleted (especially when/after getting moved to "Complete"). I know that you can link cell values from one worksheet to another, but since my data is continually changing in the Progression and Complete sheets, the linkage wouldn't maintain the correct cell values from day to day. Is there a better approach to creating "backup" data in excel than this linkage option? Preferably something that runs in the background without my input?

An option could be that I move my data from Progression into both the Complete sheet and then a hidden "Master" sheet when I run the macro. If I chose that route, how would I modify my coding to include transferring to the Master sheet as well?

Lastly, a simple linkage between the Master sheet and another sheet in a second workbook should be sufficient as a backup method?

View 1 Replies View Related

VBA Automatically Save Backup Copy In Other Folder

Jun 21, 2014

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 Related

Auto-Save Backup Copy Of Spreadsheet On Weekly Basis?

Apr 26, 2013

I 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.

View 3 Replies View Related

Macro Do Backup File

Sep 27, 2002

Just thinking is there a macro that would do a backup of the opened file just by clicking an object?

View 9 Replies View Related

Macro To Create Automatic Backup Of File

Oct 27, 2013

Is it possible to create a macro that automatically saves a backup of the excel document in another desired location?

I have this formula:

Sub backupbutton()
Dim fname
fname = "D:" & Format(Now, "dd mmm yy hh mm") & ".xlsm"
ThisWorkbook.SaveAs Filename:=fname
End Sub

But that just keeps on making multiple copies of the file rather than overwriting the backup in the D: location.

Also, that particular macro requires me to have to click on a button in order for it to work but I would prefer that it happens automatically when the original file is saved.

View 2 Replies View Related

Remove Macro From Backup Excel Document

Oct 28, 2013

I have this macro currently running on an original excel document

Private Sub Workbook_Open()Dim fname
fname = "C:ackupEconomics Tracker - " & Format(Now, "dd mmm yy hh mm AM/PM") & ".xlsm"
ThisWorkbook.SaveCopyAs Filename:=fname
Sheets("Menu").Activate
End Sub

Which creates a backup of the document each time the document is opened; I was wondering, is it possible to remove that particular macro from the backup as opposed to saving the backup as .xlsx? I don't want to be able to open a backup and the backup makes a backup

That particular macro is running on the main workbook.

View 9 Replies View Related

Macro That Automatically Saves A Backup Of Spreadsheet Every Week

Feb 16, 2010

Is there a macro that automatically saves a backup of your spreadsheet every week?

View 3 Replies View Related

Macro To Make Backup For A File At Regular Intervals Without Opening It

Dec 19, 2012

Code to save a file C:DesktopFile.xls to a different path say F:New.xls as a backup.

I want this to happen every 1 hour so that if in case my original sheet File.xls is corrupted or deleted, I have a backup data (New.xls) which was last saved.

And also File.xls need not be necessarily open.

View 1 Replies View Related

Modify Existing Macro To Copy To Different Workbook Instead Of Open Workbook?

Dec 7, 2012

Here's my macro:

Code:
Sub CopyRow()'
'Copies row to new sheet, highlights it, marks column 'A' as copied.
'
Dim cCell As Range
Set cCell = Selection.Cells(1, 1)
Selection.Copy
Sheets("Sheet2").Select
Rows("2:2").Select

[Code] .....

Is it possible to modify it to paste into a different workbook called c:filesDestination.xlsm, instead of the existing workbook (Source.xlsm)? The destination sheet name is the same (Sheet2). It's OK if both workbooks are open at the same time.

View 2 Replies View Related

Macro To Copy Only Formats And Values From One Workbook Into New Workbook

Mar 5, 2014

I have a workbook that has a lot of formulas in it that reference material stored on my local computer.

I need a macro that will copy all 42 tabs in to a new workbook book without all formulas, but saving all the formats have made. This would save me from every other day coping and pasting manually each of the pages.

View 2 Replies View Related

Adjust Copy Macro From Another Workbook To Print Name Of Workbook As Well?

Feb 11, 2014

I have this nice macro that copies data from another workbook. I want to make it to also add the filename of the workbook (for example data.xlsx) it copies the data from, in a cell on the actual workbook (for example on sheet "Combined", Cell A10). What should I add to my macro?

View 3 Replies View Related

Copy Data From One Workbook To Updated Workbook Using Macro

May 1, 2012

I am creating a spreadsheet to provide to a group of about 40 people. The spreadsheet allows each member to track the referrals they receive and give. I need to plan on creating updates for the spreadsheet and want to make it so they can easily transfer their data to the most current version in the future. Here is a breakdown of the workbook:

Worksheets:
Members
Lists
Referrals Given
Referrals Received
Totals
Formulas

I need to copy the data that they have input from the following worksheets:
Referrals Given
Referrals Received

Here is a breakdown of the "Referrals Received" worksheet:
A1:V4 - Data that will not change and includes many named cells
A5:Nxxx - Dynamic Named Range where they input their data
O5:Vxxx - Contains formulas

I need to be able to copy
A5:Vxxxxx
from the old workbook to the new

Some side items to note:
There is VBA in the worksheet of
Private Sub Worksheet_Change(ByVal Target As Range)
and included in the code is an Unprotect & Protect code to always keep the sheet protected

I figure whatever works for this sheet will work for all the sheets.

View 1 Replies View Related

Copy Macros From Personal Macro Workbook To New Workbook?

Mar 28, 2014

I need to copy several macros from the Personal Macro workbook to a new workbook that I need to take to another computer. I need to be able to run the macros on that computer. I can only record macros and make minor changes in the VB editor. I do not know VB code.

View 5 Replies View Related

Copy One Workbook To Another Using A Macro?

Jan 22, 2014

I have 2 workbooks , each with one sheet that is populated. I have tried to record the macro where by, I open the first workbook and then want the second book opened, copy the information on the 2nd workbook, paste it into the 1st workbook, close the second workbook. I have assigned a macro to it but when it opens all it does is open the second workbook.

Sub Macro1()
'
' Macro1 Macro
'

[Code].....

View 4 Replies View Related

Macro To Copy From One Workbook To Another

Feb 9, 2009

I have a spreadsheet with multiple worksheets in a spreadsheet which has been distributed and filled out by others.

I would to be able to:
-open each returned spreadsheet (by browsing and selecting the file)
-click a macro and have the macro select information from a range for each worksheet and have that information copied into the relevant worksheet in a master spreadsheet. I.e workbook1 to workbook1, workbook2 to workbook2

-during the copying process the information should be filled in the next empty row in the master spreadsheet

View 10 Replies View Related

Macro Copy From 1 To Another Workbook

Jun 18, 2009

What it does is on the menu sheet is the workbook destination (i1) and it copies the range from that workbook to the original workbook and pastes it into "sheet1" but the below brings up a mesage box about data being on the clipboard.

View 5 Replies View Related

Copy Whole Workbook With Macro

May 23, 2006

I want to use a macro to copy a specified workbook and paste it to the same directory with a different name.

View 9 Replies View Related

Macro - Copy Worksheet To Another Workbook

Nov 9, 2006

I need to come up with a macro code to copy 2 worksheet from 2 workbooks to my current workbook. I do not know what is the code such that i can copy different worksheets from other workbooks to a currently opened workbook.

Below is the scenerio i want to achieve:

worksheet1 from workbook1 need to be copied and paste as a worksheet in workbook3. worksheet1 from workbook2 need to be copied and paste as a worksheet in workbook3. workbooks will eventually contain 2 worksheets which are from workbook1 & 2.

View 5 Replies View Related

Macro To Copy Data From One Workbook To The Other

Mar 27, 2014

I'd like to create a macro to copy data from tables in a workbook named "Survey Template 2014" to another workbook named "Status Report." Basically, I'd like the macro to search through the sheets in "Survey Template 2014" based on the Aircraft Registration No: entered in cell R2 of "Status Report." Once the required sheet is found, I'd like to start copying the contents from the "Description" column from 4 tables (Left/Right Wing Structure, Flight Controls/ Empennage/Doors, Nose/Fuselage and Interior/Passenger environment/Misc) if any data exists. I'd like the data to be copied into C19 (under Tasks Column) of the "Status Report" workbook.

View 2 Replies View Related

Macro To Copy Data From Another Workbook

May 23, 2014

make a macro which copies columns B to E from workbook 'Book1' (sheet named database) into another workbook called 'Book2'?,

View 3 Replies View Related

Macro To Copy Columns From One Workbook To Another?

May 26, 2014

I have the code below which copies columns A:C from Book1 into Book2. However, it does not work when the Book1 is not open. I would like the macro to still work when the Book1 is closed.

Sub CopyColumnToWorkbook()
Dim sourceColumn As Range, targetColumn As Range
Set sourceColumn = Workbooks("Book1").Worksheets("Sheet1").Columns("A:C")
Set targetColumn = Workbooks("Book2").Worksheets("Sheet1").Columns("A:C")
sourceColumn.Copy Destination:=targetColumn
End Sub

View 2 Replies View Related

Copy And Paste From One Workbook To Another (macro)

Jun 23, 2014

I am coping form "SAC May'14 workfile" sheets "Top 20 FM" & "FM Major Inc&Dec" to "SAC Register Analysi Template" sheet "Top 20 FM" work perfectly but if i copy from e.g "SAC Feb'14 workfile, March'14 workfile" etc..

I have attached the file for ease of reference.

View 4 Replies View Related

Macro To Copy Data Workbook To Other

Nov 18, 2009

I have two workbooks which is attached 1)Daily and 2)Daily-2 i need data of Daily -2 to Daily workbook into relavent sheets not the title row. I have written some code for this but iam unable to make because data sometime is more or less in both the sheets.which needs expertise in macros which iam not.

View 3 Replies View Related

Macro To Copy One Sheet To Another Workbook?

May 21, 2003

I'm trying to copy a worksheet from one workbook to another from within a macro.

I tried recording a macro while I did it, but Excel only records the first half within the source workbook:

Sheets("RAP").Select
Sheets("RAP").Copy

The Macro Recorder doesn't show the 2nd half in which I select the destination workbook and paste. And there is no paste method; I can't say

Sheets.paste

How do I paste the sheet into the destination workbook?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved