+ Reply to Thread
Results 1 to 2 of 2

Copy a file from one folder to another and replace the existing file

  1. #1
    Registered User
    Join Date
    04-12-2019
    Location
    Dallas
    MS-Off Ver
    2016
    Posts
    64

    Copy a file from one folder to another and replace the existing file

    I'm not sure if this is possible, but I want to get a file in one folder and copy it over to another folder, but if there is a file there with the same name I want to be able to replace that file. I have a code that will take the file and copy it over if the file doesn't exist already, but if it does it doesn't replace it. I tried Application.DisplayAlerts = False, but there are no pop up when I try the code.

    Please Login or Register  to view this content.
    Also does this only work for excel or could this also work for access files?

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Copy a file from one folder to another and replace the existing file

    Could you use the Kill function to delete the existing file?

+ 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] Existing File or Not in Folder
    By Quivolt in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-31-2017, 01:56 PM
  2. Require help in modifying the code to copy data to an existing file instead of new file
    By ahamedcader in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2014, 02:57 PM
  3. Replies: 0
    Last Post: 04-21-2014, 04:03 PM
  4. macro to open, copy paste from existing excel file to a new blank file
    By 2blessed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2012, 06:05 PM
  5. [SOLVED] Macro to copy file names and data from each file in a folder into master spreadsheet
    By dee1989 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-10-2012, 05:52 AM
  6. Copy Data from Closed File to Existing File
    By srikanthbenoni in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-21-2012, 08:36 AM

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