+ Reply to Thread
Results 1 to 4 of 4

Macro with "save as" --- Need excel to overwrite a file without a prompt to overwrite

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question Macro with "save as" --- Need excel to overwrite a file without a prompt to overwrite

    I have recorded a macro to do a “save as” and write over the previous files. After each “save as” excel prompts me to answer “yes” or “no” to overwrite the previous file. I don’t want to keep hitting yes every time so my question is, is there a way to make excel automatically overwrite the files without giving me the prompt?

    Here is part of the macro (file name and path altered for security)

    ActiveWorkbook.SaveAs Filename:= _
    "G:\FOLDER\SUBFOLDER1\SUBFOLDER2\SUBFOLDER3\Excel file Name.xls", _
    FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
    ReadOnlyRecommended:=False, CreateBackup:=False
    ActiveWindow.Close

    Thanks!
    TSmith

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

    Re: Macro with "save as" --- Need excel to overwrite a file without a prompt to overwrite

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Macro with "save as" --- Need excel to overwrite a file without a prompt to overwrite

    This seems to have solved my issue. I will have to do some more testing on it next week. It's time to go home for the day. Have a nice weekend and thank you!

    TSmith

  4. #4
    Registered User
    Join Date
    08-13-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Macro with "save as" --- Need excel to overwrite a file without a prompt to overwrite

    Got back into work today and updated my macros with this. It did exactly as I needed it to. Thanks!

+ 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