+ Reply to Thread
Results 1 to 2 of 2

Need code to save file to new folder, erase from old folder

  1. #1
    Ron M.
    Guest

    Need code to save file to new folder, erase from old folder

    I've tried working this out through VBA Help, but just can't get it
    running. Can someone please help?
    ---------
    Here's the task:

    The user double clicks on a file in folderone to open it.

    She makes some changes in a few cells, and saves it to foldertwo.

    What we need is a button linked to some code that, after she makes her
    changes, when she clicks on the button, it will save the file to
    foldertwo, and delete it from folderone. The file name remains
    unchanged.
    -----------
    This is for some funding review work we're doing. We fill in a template
    spreadsheet on a project, then save it to a "ready for review" folder
    (folderone).

    Later, the final reviewer goes to that folder, opens the file, reviews
    it, maybe changes a couple of things, then saves it to an "approved"
    folder (foldertwo).

    Then she goes back to the "ready to review" folder and deletes the
    original, so they won't accumulate there.

    She has hundreds of these to do, and it's extremely time-consuming and
    tedious doing all this opening/saving/closing/deleting manually. So I'm
    trying to make a button that will do it for her.

    Thanks very much,
    Ron M.


  2. #2
    Bernie Deitrick
    Guest

    Re: Need code to save file to new folder, erase from old folder

    Ron,

    As the save macro:

    Sub SaveInApprovedFolder()
    Dim DeleteFile As String

    Application.DisplayAlerts = False
    DeleteFile = ActiveWorkbook.FullName
    ActiveWorkbook.SaveAs "Drive:\Approved file path\" & ActiveWorkbook.Name
    Kill DeleteFile
    Application.DisplayAlerts = True
    End Sub

    HTH,
    Bernie
    MS Excel MVP


    "Ron M." <[email protected]> wrote in message
    news:[email protected]...
    > I've tried working this out through VBA Help, but just can't get it
    > running. Can someone please help?
    > ---------
    > Here's the task:
    >
    > The user double clicks on a file in folderone to open it.
    >
    > She makes some changes in a few cells, and saves it to foldertwo.
    >
    > What we need is a button linked to some code that, after she makes her
    > changes, when she clicks on the button, it will save the file to
    > foldertwo, and delete it from folderone. The file name remains
    > unchanged.
    > -----------
    > This is for some funding review work we're doing. We fill in a template
    > spreadsheet on a project, then save it to a "ready for review" folder
    > (folderone).
    >
    > Later, the final reviewer goes to that folder, opens the file, reviews
    > it, maybe changes a couple of things, then saves it to an "approved"
    > folder (foldertwo).
    >
    > Then she goes back to the "ready to review" folder and deletes the
    > original, so they won't accumulate there.
    >
    > She has hundreds of these to do, and it's extremely time-consuming and
    > tedious doing all this opening/saving/closing/deleting manually. So I'm
    > trying to make a button that will do it for her.
    >
    > Thanks very much,
    > Ron M.
    >




+ 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