+ Reply to Thread
Results 1 to 4 of 4

VBA Code to NOT Overwrite file

  1. #1
    Registered User
    Join Date
    05-11-2015
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    28

    VBA Code to NOT Overwrite file

    Hi,

    I was wondering if there is way not to override existing file in the folder.

    For example if I have a file named "Test", I don't want the vba code to overwrite the file but save it as "Test(1)"

    Please Login or Register  to view this content.
    I am saving it using above code. Any help?

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA Code to NOT Overwrite file

    Hi Wolf,

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: VBA Code to NOT Overwrite file

    Maybe ...

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: VBA Code to NOT Overwrite file

    Another possibility.

    Please Login or Register  to view this content.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

+ 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] Overwrite A VB code for all users...IF possible?
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2013, 11:46 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. Code for asking for overwrite YES/NO
    By zyrr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2012, 09:53 AM
  4. file overwrite
    By Zrx in forum Excel General
    Replies: 4
    Last Post: 11-19-2011, 11:25 AM
  5. Overwrite file always
    By ledzepe in forum Excel General
    Replies: 1
    Last Post: 12-20-2006, 11:54 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