PC Review


Reply
Thread Tools Rate Thread

Copy and paste over existing file?

 
 
Cam
Guest
Posts: n/a
 
      30th Jun 2009

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 With Quote
 
 
 
 
Patrick Molloy
Guest
Posts: n/a
 
      30th Jun 2009

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" <(E-Mail Removed)> wrote in message
news:EAB1C140-38B8-4350-B1AE-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to copy and paste over existing files Cam Microsoft Excel Misc 0 30th Jun 2009 03:19 PM
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 Microsoft Excel Programming 1 17th Oct 2005 08:56 AM
How to Copy/Paste existing row to a new row in data grid =?Utf-8?B?RGFycmVsbCBXZXNsZXk=?= Microsoft VB .NET 6 21st Feb 2005 03:01 PM
copy and paste table in another existing worksheet Andreas Aust Microsoft Excel Programming 2 25th Aug 2004 01:22 AM
How can I copy and paste existing web pages to a new URL? =?Utf-8?B?Qnlyb24=?= Microsoft Frontpage 2 18th Nov 2003 11:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:14 AM.