+ Reply to Thread
Results 1 to 2 of 2

Macro to Save As a Copy of the File, Save the Original File, & Overwrite Previous Versions

  1. #1
    Registered User
    Join Date
    08-02-2013
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    28

    Macro to Save As a Copy of the File, Save the Original File, & Overwrite Previous Versions

    The current macro that I am working with works fine, but it saves the original file as the name I would like to save the copy as. Additionally, I would like to save the file as Current Boat Log.xlsm (which it is currently saved as) and overwrite the previous edition of Current Boat Log.xlsm.

    'saves/renames file to desktop

    s1 = "C:\Users\006270**\Desktop\Vessel Logs\Current Data"
    With Sheets("Lookup Data")
    s2 = .Range("S46").Text
    s3 = .Range("S47").Text
    s4 = .Range("S48").Text
    End With
    s5 = s1 & "\" & s2 & " " & s3 & " - " & s4 & ".xlsm"
    ActiveWorkbook.SaveAs Filename:=s5


    Thanks,
    Jordan

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Macro to Save As a Copy of the File, Save the Original File, & Overwrite Previous Vers

    The thing is that the saveas causes the current file to take on the new name. There are a couple of ways to do it and this might work for you:


    Please Login or Register  to view this content.
    PS: what sort of boats?


    click on the * Add Reputation if this was useful or entertaining.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Save file as copy while still having original still open
    By djblois1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2013, 03:40 PM
  2. Automatically Save and overwrite old macro file
    By asdf// in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-12-2012, 12:43 PM
  3. Save as macro allowing user to overwrite old file
    By jsantos in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-12-2011, 08:41 PM
  4. Macro to keep original file open, not 'save as' file
    By LonestarGuy in forum Excel General
    Replies: 4
    Last Post: 06-09-2010, 03:53 PM
  5. [SOLVED] Excel prompts me to save a copy or overwrite file.
    By Vinny in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-20-2005, 11:06 AM

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