Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to autofilter other file and copy in opened file matthias Excel Programming 4 August 17th 06 10:52 AM
stop excel file opened as read only if already opened by another u bobm Excel Programming 3 August 5th 05 04:11 PM
How to make macro start when file is opened gifer Excel Programming 2 March 8th 05 07:25 PM
how to make a macro and run in every excel book that opened? wayan Excel Programming 3 February 22nd 05 08:47 AM
Copy cells from xls file opened in browser escorido Excel Programming 0 July 6th 04 04:04 AM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"