Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VB to make a copy of opened file
Hi there.
I have a spreadsheet that I would like to make a back up of every week. My plan is: * on workbook open logic inspects last back up date and back up period * if it has been longer since the last back up then the configured period then make the back up I have this working fine - the problem comes when I write the code to actually perform the back up. At the moment the only way I can see of doing this is using ActiveWorkbook.SaveAs to create the backup with the backup name. The problem then is the user has the backup open and not the actual spreadsheet. Therefore I would have to re-open the actual spreadsheet and close the back-up to finish the manoeuvre. As this will happen when any old user opens the spreadsheet I want it to be fast and invisible - this is not possible with my above solution as saves and opens on our network take some time. Is there some other API available where I can just tell Excel to make a copy with a specified name and leave the user with the original sporeadsheet open? Cheers Chrisso |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VB to make a copy of opened file
Hi Chrisso,
See the SaveCopyAs method and example in VBA help. The SaveCopyAs method saves a copy but the current file remains open. --- Regards, Norman "Chrisso" wrote in message ups.com... Hi there. I have a spreadsheet that I would like to make a back up of every week. My plan is: * on workbook open logic inspects last back up date and back up period * if it has been longer since the last back up then the configured period then make the back up I have this working fine - the problem comes when I write the code to actually perform the back up. At the moment the only way I can see of doing this is using ActiveWorkbook.SaveAs to create the backup with the backup name. The problem then is the user has the backup open and not the actual spreadsheet. Therefore I would have to re-open the actual spreadsheet and close the back-up to finish the manoeuvre. As this will happen when any old user opens the spreadsheet I want it to be fast and invisible - this is not possible with my above solution as saves and opens on our network take some time. Is there some other API available where I can just tell Excel to make a copy with a specified name and leave the user with the original sporeadsheet open? Cheers Chrisso |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VB to make a copy of opened file
..SaveCopyAs ?
NickHK "Chrisso" wrote in message ups.com... Hi there. I have a spreadsheet that I would like to make a back up of every week. My plan is: * on workbook open logic inspects last back up date and back up period * if it has been longer since the last back up then the configured period then make the back up I have this working fine - the problem comes when I write the code to actually perform the back up. At the moment the only way I can see of doing this is using ActiveWorkbook.SaveAs to create the backup with the backup name. The problem then is the user has the backup open and not the actual spreadsheet. Therefore I would have to re-open the actual spreadsheet and close the back-up to finish the manoeuvre. As this will happen when any old user opens the spreadsheet I want it to be fast and invisible - this is not possible with my above solution as saves and opens on our network take some time. Is there some other API available where I can just tell Excel to make a copy with a specified name and leave the user with the original sporeadsheet open? Cheers Chrisso |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VB to make a copy of opened file
Thanks Norman & Nick - I guess I could not see the wood for the trees!
Chrisso |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to autofilter other file and copy in opened file | Excel Programming | |||
stop excel file opened as read only if already opened by another u | Excel Programming | |||
How to make macro start when file is opened | Excel Programming | |||
how to make a macro and run in every excel book that opened? | Excel Programming | |||
Copy cells from xls file opened in browser | Excel Programming |