Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cam Cam is offline
external usenet poster
 
Posts: 165
Default Copy and paste over existing file?


Hello,

I have several Excel files that I update (refresh) the data on my C:\ drive
(much faster refreshing time). Then, I would have to copy all these files and
paste over the existing files (same file name) in a network drive.

Is there a way in macro to automate this process? I remembered back in the
DOS days, you can create a bat file to perform this function. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Copy and paste over existing file?


in Excel's VBA editor, set a Reference (menu: Tools/References...) to the
Microsoft Scripting Runtime DLL and add this code to a new module

Sub MoveFiles()
Application.DisplayAlerts=False
With New FileSystemObject
.MoveFolder "{source folder}", "{target folder}"
End With
Application.DisplayAlerts=True
End Sub

"Cam" wrote in message
...
Hello,

I have several Excel files that I update (refresh) the data on my C:\
drive
(much faster refreshing time). Then, I would have to copy all these files
and
paste over the existing files (same file name) in a network drive.

Is there a way in macro to automate this process? I remembered back in the
DOS days, you can create a bat file to perform this function. Thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to copy and paste over existing files Cam Excel Discussion (Misc queries) 1 July 1st 09 08:37 PM
how do I copy an existing file to a flash drive Sparky Excel Discussion (Misc queries) 4 July 13th 08 08:20 PM
After Copy and Paste, Add to an Existing Named Range Aria[_2_] Excel Programming 4 March 8th 07 12:53 AM
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro Steven Excel Programming 1 October 17th 05 08:56 AM
copy and paste table in another existing worksheet Andreas Aust Excel Programming 2 August 25th 04 01:22 AM


All times are GMT +1. The time now is 11:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"