+ Reply to Thread
Results 1 to 4 of 4

Don't want to over write existing without a prompt

  1. #1
    Forum Contributor
    Join Date
    01-18-2012
    Location
    nr Salisbury, UK
    MS-Off Ver
    Excel 2010
    Posts
    126

    Don't want to over write existing without a prompt

    This is a cross post, that appears to have gone cold. Hoping someone here can help me complete my puzzle.
    I would dearly like to put this one to bed, your help would be greatly received.

    Cross posted here: http://windowssecrets.com/forums/showthread.php/159738

    As my code is, a new Word Document is created & saved, if it exists already it simply over writes the original without any prompt or option to manually give it a different name.
    I would like to;
    a) have option of renaming it manually
    b) have option of overwriting it or not


    Please Login or Register  to view this content.

    By including the code below I thought I would simply be-able to manipulate the MsgBox arguments to achieve that.
    However syntax will not allow me to have a YesNo MsgBox option


    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: Don't want to over write existing without a prompt

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    01-18-2012
    Location
    nr Salisbury, UK
    MS-Off Ver
    Excel 2010
    Posts
    126

    Re: Don't want to over write existing without a prompt

    Six, thanks so much.

    Now I can see where I was going wrong.
    Have had a very quick play around with it, and with some more juggling of the code layout I believe we could be there.
    Will post back a completed version when done.

    Thanks again, you’re a life saver.
    Last edited by julhs; 02-28-2014 at 12:23 PM.

  4. #4
    Forum Contributor
    Join Date
    01-18-2012
    Location
    nr Salisbury, UK
    MS-Off Ver
    Excel 2010
    Posts
    126

    Re: Don't want to over write existing without a prompt

    Six, many thanks for the pointer. Below is how it turned out.
    Decided to leave out the renaming part; it did work but it all got a bit messy with the "If's"
    In the end; took the “Not” out of If Not Dir(strFilename), only because it was easier to handle this way around, the couple of extra
    If’s and that was it.


    Please Login or Register  to view this content.
    Last edited by julhs; 02-28-2014 at 10:45 PM.

+ 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. [SOLVED] How do I write to slect Yes on the prompt box?
    By thollander in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-04-2013, 11:14 AM
  2. [SOLVED] Write data to an existing textfile
    By Joakim N in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2013, 05:56 AM
  3. Export as Fixed Format macro not getting existing file prompt
    By httdy1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-24-2009, 04:03 PM
  4. prompt to replace existing file
    By mixel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2007, 01:28 PM
  5. VBA to write Auto_Open sub into existing workbook
    By grime in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2006, 05:44 PM

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