+ Reply to Thread
Results 1 to 4 of 4

Button that creates a back up in Excel

  1. #1
    Registered User
    Join Date
    06-26-2005
    Posts
    10

    Button that creates a back up in Excel

    I've been given the task of making a spreadsheet that will make a copy of itself, at the end of the day. I would like to have a button in my spreadsheet that creates a back up copy and then exit. Can I get it to check for (and maybe create) a folder called 'backup' (at the same level as the original spreadsheet) and then save it there? I don't want the user to get too involved in this process - apart from clicking the 'Backup and Exit' button.

    Can anyone explain what I would have to do in order to do that? What would I have to write in Visual Basic? Thanks for your co-operation..

  2. #2
    Anne Troy
    Guest

    Re: Button that creates a back up in Excel

    You could try something like this, petros:
    http://www.vbaexpress.com/kb/getarticle.php?kb_id=456
    *******************
    ~Anne Troy

    www.OfficeArticles.com
    www.MyExpertsOnline.com


    "petros89" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I've been given the task of making a spreadsheet that will make a copy
    > of itself, at the end of the day. I would like to have a button in my
    > spreadsheet that creates a back up copy and then exit. Can I get it to
    > check for (and maybe create) a folder called 'backup' (at the same
    > level as the original spreadsheet) and then save it there? I don't want
    > the user to get too involved in this process - apart from clicking the
    > 'Backup and Exit' button.
    >
    > Can anyone explain what I would have to do in order to do that? What
    > would I have to write in Visual Basic? Thanks for your co-operation..
    >
    >
    >
    > --
    > petros89
    > ------------------------------------------------------------------------
    > petros89's Profile:

    http://www.excelforum.com/member.php...o&userid=24645
    > View this thread: http://www.excelforum.com/showthread...hreadid=382319
    >




  3. #3
    Registered User
    Join Date
    06-26-2005
    Posts
    10
    Yes, well it's close enough. Thanks for the help!

  4. #4
    Bob Phillips
    Guest

    Re: Button that creates a back up in Excel

    Here is some code

    With ActiveWorkbook
    On Error Resume Next
    MkDir .Path & "\backup"
    On Error GoTo 0
    .SaveCopyAs .Path & "\backup\" & .Name
    End With


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "petros89" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I've been given the task of making a spreadsheet that will make a copy
    > of itself, at the end of the day. I would like to have a button in my
    > spreadsheet that creates a back up copy and then exit. Can I get it to
    > check for (and maybe create) a folder called 'backup' (at the same
    > level as the original spreadsheet) and then save it there? I don't want
    > the user to get too involved in this process - apart from clicking the
    > 'Backup and Exit' button.
    >
    > Can anyone explain what I would have to do in order to do that? What
    > would I have to write in Visual Basic? Thanks for your co-operation..
    >
    >
    >
    > --
    > petros89
    > ------------------------------------------------------------------------
    > petros89's Profile:

    http://www.excelforum.com/member.php...o&userid=24645
    > View this thread: http://www.excelforum.com/showthread...hreadid=382319
    >




+ 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