+ Reply to Thread
Results 1 to 3 of 3

Auto backup after save

  1. #1
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Auto backup after save

    There are hundreds of threads on this subject, I feel bad starting another, but I'm still really struggling to make this work. All I want is to save a copy of a file in a different location after I save it.

    this is adapted from here:
    http://www.ozgrid.com/forum/showthread.php?t=99706
    ("interesting" moderation)
    Please Login or Register  to view this content.
    It's all fine except for when the save is part of the close routine, which traps it in an eternal loop.

    I've tried using boolean for closing, and replicating the entire close event with an inputbox, but this just seem bloody awful.

    What am I doing wrong?

    CC
    Last edited by Cheeky Charlie; 11-17-2009 at 07:01 PM. Reason: reference

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Auto backup after save

    This goes in an add-in?

    How and where do you initialize the class?

    Could you not write code for an App_WorkbookBeforeClose event, cancel the Close, and close manually after checking for Saved?

    Edit: Rereading your question, I would add to my questions, why don't you use SaveCopyAs instead of SaveAs?
    Last edited by shg; 11-17-2009 at 09:36 PM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Auto backup after save

    is in personal xls

    the class is initialized on workbook open

    I like that - wouldn't backup every time I saved - but would backup when closed, only if the workbook being closed were saved... I think I'll pursue that

    Re: save types, yes and no - I would need both in the given macro - the one I have, because I have trapped the beforesave event - so I'd need to save it as per the save "intent" and then a savecopy as after for backup. This is irrelevant if I use the beforeclose method though...

    CC

+ 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