Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default excel vba copy files

Hello,

I have a two columns : one with the path and one with the file name.
Can anyone show me how to create a macro that copy those files to
C:\Temp

So for each file (column B), it will use its path (column A) and makes
a copy of that file to C:\Temp until all the files have been copied.

Thank you in advance
Gabriel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default excel vba copy files

You can use FileCopy

You can loop through the list
If you need help post back

Sub A()
With Sheets("sheet1")
FileCopy .Range("A1").Value & .Range("B1").Value, "C:\" & .Range("B1").Value
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Gabriel" wrote in message om...
Hello,

I have a two columns : one with the path and one with the file name.
Can anyone show me how to create a macro that copy those files to
C:\Temp

So for each file (column B), it will use its path (column A) and makes
a copy of that file to C:\Temp until all the files have been copied.

Thank you in advance
Gabriel



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
Codes needed to copy same one row from more than 300 Excel files Joe Roberto Excel Discussion (Misc queries) 1 September 25th 09 12:07 PM
How to MATCH or VLOOKUP & copy using 2 excel files Sandeep Excel Worksheet Functions 3 October 25th 08 06:29 PM
How to lock Excel files so that others can copy it & not chg it. SSurfer Excel Worksheet Functions 0 July 3rd 07 09:26 PM
Macro to copy range from Excel files in folder nc Excel Discussion (Misc queries) 1 June 15th 05 11:11 AM
indirect copy protection of Excel files ysaneo Excel Programming 2 July 17th 04 05:29 PM


All times are GMT +1. The time now is 02:29 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"