+ Reply to Thread
Results 1 to 3 of 3

Saving a new added workbook with existing name on HD, but without being prompted.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Saving a new added workbook with existing name on HD, but without being prompted.

    Hi there ,
    I'd like to save a new added workbook and overwrite an existing file on the HD.
    I have a file named c:\barcodes.xls"
    The code below gives me a prompt :

    "A file named 'C:\barcodes.xls' already exists in this location.Do you want to replace it?"

            New_file_name = "C:\barcodes.xls"
            ActiveWorkbook.SaveAs Filename:=New_file_name, FileFormat:=xlNormal
    Is there a way or workaround to save the file without the prompt.?
    Thanks for helping me out.
    Last edited by MarMo; 04-28-2010 at 06:54 AM.

  2. #2
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: Saving a new added workbook with existing name on HD, but without being prompted.

    Application.DisplayAlerts = False
    ' Your save code
    Application.DiplayAlerts = True
    should take care of it for for you.

  3. #3
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Re: Saving a new added workbook with existing name on HD, but without being prompted.

    Wamp,
    Thanks for the quick reply ( as always on this forum )
    I should have searched the net first , cause i found this also on other sites.
    thanks and see u on this forum.

+ 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