![]() |
How to copy and paste multiple files
Hi there,
I'm using excel 2007 and I wrote Sub Button1_Click() FileCopy "C:\Excel\book1.txt" , "C:\Excel\Test\book2.txt" End Sub Everything works file but lets assume I have in my spreadsheet two columns Column A = Source directory looks like this C:\Source\file1.txt C:\Source\file2.xls .... And so on Column B = Destination looks like this C:\Destination\file11.txt C:\Destination\file22.xls .... And so on My question is how make the copy and paste function to read the copy and paste from the spreadsheet itself Until the end of the list of files Thanks, Ed Dror Andrew Lauren Co. |
How to copy and paste multiple files
Sub Button1_Click() RowCount = 1 do while Range("A" & RowCount) < "" FileCopy Range("A" & RowCount), Range("B" & RowCount) RowCount = RowCount + 1 loop End Sub "Ed Dror" wrote: Hi there, I'm using excel 2007 and I wrote Sub Button1_Click() FileCopy "C:\Excel\book1.txt" , "C:\Excel\Test\book2.txt" End Sub Everything works file but lets assume I have in my spreadsheet two columns Column A = Source directory looks like this C:\Source\file1.txt C:\Source\file2.xls .... And so on Column B = Destination looks like this C:\Destination\file11.txt C:\Destination\file22.xls .... And so on My question is how make the copy and paste function to read the copy and paste from the spreadsheet itself Until the end of the list of files Thanks, Ed Dror Andrew Lauren Co. |
How to copy and paste multiple files
Joel,
Thank you very much, It works Ed Dror "Joel" wrote in message ... Sub Button1_Click() RowCount = 1 do while Range("A" & RowCount) < "" FileCopy Range("A" & RowCount), Range("B" & RowCount) RowCount = RowCount + 1 loop End Sub "Ed Dror" wrote: Hi there, I'm using excel 2007 and I wrote Sub Button1_Click() FileCopy "C:\Excel\book1.txt" , "C:\Excel\Test\book2.txt" End Sub Everything works file but lets assume I have in my spreadsheet two columns Column A = Source directory looks like this C:\Source\file1.txt C:\Source\file2.xls .... And so on Column B = Destination looks like this C:\Destination\file11.txt C:\Destination\file22.xls .... And so on My question is how make the copy and paste function to read the copy and paste from the spreadsheet itself Until the end of the list of files Thanks, Ed Dror Andrew Lauren Co. |
All times are GMT +1. The time now is 01:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com