+ Reply to Thread
Results 1 to 2 of 2

VBA code to message box if filename already exists then prevent save

  1. #1
    Registered User
    Join Date
    02-16-2018
    Location
    Edmonton, Canada
    MS-Off Ver
    Office 365
    Posts
    30

    VBA code to message box if filename already exists then prevent save

    Hello all,

    I have the following code to automatically save a backup copy of the workbook to a designated folder with the filename as what appears in cell n43 however I need it to display a message indicating that the filename already exists, then if so prevent the user from saving. The code works no problem right now but it will save over the backup copy without warning.

    Thanks in advance!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,937

    Re: VBA code to message box if filename already exists then prevent save

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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 as macro code, filename and directory acquisition.
    By DanHopkins in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2014, 06:08 AM
  2. [SOLVED] Check if file exists and if so save file incremented by 1 e.g. filename(1).xlsm
    By ratdogexcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2014, 01:15 AM
  3. [SOLVED] Disable save and prevent "Do you want to save" message from prompting for read-only file
    By hcyeap in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-12-2014, 12:29 AM
  4. [SOLVED] Find if filename exists and update variable within the filename structure
    By Lungfish in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-18-2013, 02:42 AM
  5. Replies: 2
    Last Post: 08-13-2012, 05:20 PM
  6. Need code to save under filename drawn from specific cell
    By j_gilhuly in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-18-2009, 07:54 PM
  7. How to prevent "Changed ... Save?" Message after disabling Shape?
    By Joe HM in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-04-2006, 11:30 AM

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