+ Reply to Thread
Results 1 to 3 of 3

How can I make it overwrite without prompting?

  1. #1
    Registered User
    Join Date
    06-22-2015
    Location
    Longview WA
    MS-Off Ver
    MS Office 2000
    Posts
    6

    How can I make it overwrite without prompting?

    I have this code in a Sub Procedure:

    Workbooks("New Med Sheets1").SaveAs S

    S is a string variable that contains the name I want to save the workbook to. The problem is filename workbook already exists. I want to overwrite WITHOUT seeing a prompt asking if I want to overwrite it.

    How can I make it overwrite without prompting/asking me about it?

    I tried putting Application.DisplayAlerts = False above the code that saves the workbook, but DisplayAlerts has no effect.

  2. #2
    Valued Forum Contributor Kamboj's Avatar
    Join Date
    09-25-2014
    Location
    India
    MS-Off Ver
    2003 - 2010
    Posts
    430

    Re: How can I make it overwrite without prompting?

    Please Login or Register  to view this content.
    is the correct code

  3. #3
    Valued Forum Contributor Kamboj's Avatar
    Join Date
    09-25-2014
    Location
    India
    MS-Off Ver
    2003 - 2010
    Posts
    430

    Re: How can I make it overwrite without prompting?

    if it not working then use ActiveWorkbook.Application.DisplayAlerts = False

+ 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. How do I use VBA to make user input part of a filename during a save overwrite?
    By ChristianMba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-19-2012, 10:53 AM
  2. [SOLVED] Macro with "save as" --- Need excel to overwrite a file without a prompt to overwrite
    By tsmith1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2012, 10:54 AM
  3. Prevent data cell overwrite but allow blank cell overwrite
    By Squasher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2011, 09:24 AM
  4. Overwrite existing workbook without prompting
    By Cumberland in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2007, 12:23 PM
  5. [SOLVED] network save msg overwrite or make copy
    By Bill Stenzel in forum Excel General
    Replies: 0
    Last Post: 07-28-2005, 02:06 PM

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