+ Reply to Thread
Results 1 to 5 of 5

automatically save a copy of the workbook when saving or closing it

  1. #1
    Registered User
    Join Date
    06-17-2008
    Posts
    6

    automatically save a copy of the workbook when saving or closing it

    Hi,

    In the case of somebody saving or closing a document (ActiveWorkbook.Save or ActiveWorkbook.Close or ActiveWorkbook.SaveAs) I would like to create another copy of the workbook in a specific location (harcoded in the macro) named as the original file but with the timestamp as ending (i.e. name_timestamp.xls).

    Can anybody help me?

    Thanks in advance

  2. #2
    Registered User
    Join Date
    06-12-2008
    Location
    Newbury
    MS-Off Ver
    Office 365 ProPlus
    Posts
    92
    use the 'savecopyas' method of the workbook

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-17-2008
    Posts
    6
    thanks for the answer, but how do I trigger the script when there is a save, save as or a close? I want to make a copy of the file in any of those cases.

  4. #4
    Registered User
    Join Date
    06-12-2008
    Location
    Newbury
    MS-Off Ver
    Office 365 ProPlus
    Posts
    92
    Use the workbook events, in the VB editor select workbook from the left hand drop down menu near the top of the window and choose the beforesave and beforeclose events from the right hand drop down menu.

  5. #5
    Registered User
    Join Date
    06-17-2008
    Posts
    6
    Thank you so much for the answer. It did work perfectly

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1