Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
save a backup copy in different folder
Is there a way to save a backup copy od xl2k workbook in a DIFFERENT folder
than the original? With mutliple workbooks folder becomes too cluttered. Thx |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
save a backup copy in different folder
Here's some code that might do the job you want.........
Sub SaveArchive2() ' ================================================== ========= ' Saves the workbook to a predetermined Archive Directory and appends date and time to filename, ' then re-configures file so it will naturally be saved to the directory from whence it came. ' ================================================== ============================ CurrentPath = CurDir ArchivePath = "c:\TypeYourArchivePathHere" WorkBookName = ActiveWorkbook.Name FName = ArchivePath FName = FName + Worksheets("Sheet1").Range("AH36").Value 'Used to name archived file to cell value FName = FName + Str(Hour(Time)) + "_" + Str(Minute(Time)) + "_" + Str(Second(Time)) FName = FName + "_" + Str(Month(Date)) + "_" + Str(Day(Date)) + "_" + Str(Year(Date)) Application.DisplayAlerts = False ActiveWorkbook.SaveAs FName FName = CurrentPath + "\" + WorkBookName ActiveWorkbook.SaveAs FName Application.DisplayAlerts = True End Sub hth Vaya con Dios, Chuck, CABGx3 "GT" wrote: Is there a way to save a backup copy od xl2k workbook in a DIFFERENT folder than the original? With mutliple workbooks folder becomes too cluttered. Thx |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
save a backup copy in different folder
Thanks Chuck--Unfortunately I know nothing about programming, so unless these
are easy changes I guess I'm out of luck. ps I liked your summary. I got most of it except the MMOUS2k? "CLR" wrote: Here's some code that might do the job you want......... Sub SaveArchive2() ' ================================================== ========= ' Saves the workbook to a predetermined Archive Directory and appends date and time to filename, ' then re-configures file so it will naturally be saved to the directory from whence it came. ' ================================================== ============================ CurrentPath = CurDir ArchivePath = "c:\TypeYourArchivePathHere" WorkBookName = ActiveWorkbook.Name FName = ArchivePath FName = FName + Worksheets("Sheet1").Range("AH36").Value 'Used to name archived file to cell value FName = FName + Str(Hour(Time)) + "_" + Str(Minute(Time)) + "_" + Str(Second(Time)) FName = FName + "_" + Str(Month(Date)) + "_" + Str(Day(Date)) + "_" + Str(Year(Date)) Application.DisplayAlerts = False ActiveWorkbook.SaveAs FName FName = CurrentPath + "\" + WorkBookName ActiveWorkbook.SaveAs FName Application.DisplayAlerts = True End Sub hth Vaya con Dios, Chuck, CABGx3 "GT" wrote: Is there a way to save a backup copy od xl2k workbook in a DIFFERENT folder than the original? With mutliple workbooks folder becomes too cluttered. Thx |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
save a backup copy in different folder
Lol..........MMOUS2k stands for Master Microsoft Office User Specialist, in
Office 2000. an old certification that Microsoft had several years ago. As for the code.......You're welcome to it, of course, however if you're just beginning, it may be a bit much for a first bite. Hopefully you might have a local Guru, that might can help you to cut and paste it into a regular code module and make the necessary modifications for you to be able to use it in your system. It does require a bit of tailoring. For the time being, the best solution to your problem might be to ignore the code solution, and just go into Windows Explorer and Copy and Paste the saved file over to another Directory, and modify the filename slightly, like by adding the date, so one won't cancel out the other as you add future copies. And of course you can always do File SaveAs to place the file somewhere else......you just have to be careful if you're one who likes to open the file from the Excel File menu, that you get the correct and current version each time.........hope some of this is helpful. Vaya con Dios, Chuck, CABGx3 "GT" wrote: Thanks Chuck--Unfortunately I know nothing about programming, so unless these are easy changes I guess I'm out of luck. ps I liked your summary. I got most of it except the MMOUS2k? "CLR" wrote: Here's some code that might do the job you want......... Sub SaveArchive2() ' ================================================== ========= ' Saves the workbook to a predetermined Archive Directory and appends date and time to filename, ' then re-configures file so it will naturally be saved to the directory from whence it came. ' ================================================== ============================ CurrentPath = CurDir ArchivePath = "c:\TypeYourArchivePathHere" WorkBookName = ActiveWorkbook.Name FName = ArchivePath FName = FName + Worksheets("Sheet1").Range("AH36").Value 'Used to name archived file to cell value FName = FName + Str(Hour(Time)) + "_" + Str(Minute(Time)) + "_" + Str(Second(Time)) FName = FName + "_" + Str(Month(Date)) + "_" + Str(Day(Date)) + "_" + Str(Year(Date)) Application.DisplayAlerts = False ActiveWorkbook.SaveAs FName FName = CurrentPath + "\" + WorkBookName ActiveWorkbook.SaveAs FName Application.DisplayAlerts = True End Sub hth Vaya con Dios, Chuck, CABGx3 "GT" wrote: Is there a way to save a backup copy od xl2k workbook in a DIFFERENT folder than the original? With mutliple workbooks folder becomes too cluttered. Thx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save copy of folder with linked files | Excel Worksheet Functions | |||
why do I get a message that says save a copy or overwrite changes | Excel Discussion (Misc queries) | |||
Automatic backup copy | Charts and Charting in Excel | |||
can you get a backup copy of a document in Excel? | Excel Discussion (Misc queries) | |||
how to save to My Documents folder on different PCs | Excel Worksheet Functions |