Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to automate the copy of a workbook.? I have an Excel
spreadsheet located at C:\Reports\Test.xls, I need to copy it to D:\BackUpReports\ What is the best way to do this. With thanks Bob |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use ActiveWorkbook.SaveCopyAs ... which will save a backup copy for you.
You can put the code in one of the following sub: Private Sub Workbook_BeforeClose(Cancel As Boolean) ' if you want save a backup copy before close the file End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) ' if you want save a backup copy before any saving action End Sub Private Sub Workbook_Open() ' if you want save a backup copy before file open End Sub "Robert Gillard" wrote in message k... I need to automate the copy of a workbook.? I have an Excel spreadsheet located at C:\Reports\Test.xls, I need to copy it to D:\BackUpReports\ What is the best way to do this. With thanks Bob |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bob
From an external macro, something like Sub test() FileCopy "C:\temp\song.mp3", "D:\Anthems\song.mp3" End Sub from a macro within the file itself, something like Sub test2() ThisWorkbook.SaveCopyAs "D:\Anthems\" & ThisWorkbook.Name End Sub HTH. Best wishes Harald "Robert Gillard" skrev i melding k... I need to automate the copy of a workbook.? I have an Excel spreadsheet located at C:\Reports\Test.xls, I need to copy it to D:\BackUpReports\ What is the best way to do this. With thanks Bob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook | Excel Worksheet Functions | |||
Excel-how to link source workbook to copy of destination workbook | Excel Worksheet Functions | |||
Copy cells based on conditions in one workbook to another workbook | Excel Discussion (Misc queries) | |||
Copy cells based on conditions in one workbook to another workbook | Excel Worksheet Functions | |||
Copy a range of cells in an unopened workbook and paste it to the current workbook | Excel Programming |