+ Reply to Thread
Results 1 to 3 of 3

Replace Existing File

Hybrid View

  1. #1
    Lynn
    Guest

    Replace Existing File

    I am using the following code to save the active workbook:

    ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"

    How can I get it to select Yes if prompted to Replace the Existing File?


  2. #2
    Dave Peterson
    Guest

    Re: Replace Existing File

    application.displayalerts = false
    ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"
    application.displayalerts = true

    Will save without a prompt.

    Lynn wrote:
    >
    > I am using the following code to save the active workbook:
    >
    > ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"
    >
    > How can I get it to select Yes if prompted to Replace the Existing File?


    --

    Dave Peterson

  3. #3
    Lynn
    Guest

    Re: Replace Existing File

    Thanks Dave!

    "Dave Peterson" wrote:

    > application.displayalerts = false
    > ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"
    > application.displayalerts = true
    >
    > Will save without a prompt.
    >
    > Lynn wrote:
    > >
    > > I am using the following code to save the active workbook:
    > >
    > > ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"
    > >
    > > How can I get it to select Yes if prompted to Replace the Existing File?

    >
    > --
    >
    > Dave Peterson
    >


+ 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