+ Reply to Thread
Results 1 to 5 of 5

Macro to keep original file open, not 'save as' file

  1. #1
    Registered User
    Join Date
    06-09-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question Macro to keep original file open, not 'save as' file

    Howdy... I don't know VBA. I got the below code off the internet and modified it slightly and it works for renaming. It does a 'save as' and replaces part of the filename with the date... it then keeps the new file ('save as' file) open. Problem is, I want the original file open and the 'save as' file closed. I've tried adding various file close and open commands but to no avail.

    Restated: After doing a 'save as', I want to close the 'save as' file and open the original file I was working with.

    Thanks!

    This renames file and keeps 'save as' file open.

    Please Login or Register  to view this content.
    Last edited by LonestarGuy; 06-09-2010 at 03:01 PM.

  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: Macro to keep original file open, not 'save as' file

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-09-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Macro to keep original file open, not 'save as' file

    Done. Thanks!

  4. #4
    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: Macro to keep original file open, not 'save as' file

    Maybe like this:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-09-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Macro to keep original file open, not 'save as' file

    Thx shg, but it doesn't seem to be working. I don't see a new file with the date appended. I need current xxx latest.xls file saved as xxx (yesterday'sdate).xls then close it and reopen the xxx latest.xls file to carry over and use for today's work. I hope that makes sense. Your code isn't creating the dated file for me, at least not in the same folder where I can find it.

    It's like making a backup really, with a date stamp replacing the "latest" part of the filename.
    Last edited by LonestarGuy; 06-09-2010 at 03:54 PM. Reason: added verbiage

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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