Using a variable name as part of a file pathname to open many files

  • Thread starter Thread starter trickydick
  • Start date Start date
T

trickydick

I need to open 76 Excel files one at a time and copy the data on a ta
to a rollup workbook with 76 tabs. Is there a way to build an arra
with the names of the 76 workbooks and then change the pathname usin
the 76 names in the array so I can open each workbook, copy th
information to the rollup workbook, and close the individual workbooks
The workbooks are too large to open all of them and then copy the dat
to the rollup workbook!

TIA!!:
 
Yes this can be done,

use a string variable for the name of the
workbooks.open Filename:=strFileName
''where strFileName is a path and file name of the file
you want to open, then use the activeworkbook and
thisworkbook object to play around with the workbooks and
data.

Keith
www.kjtfs.com
 
Back
Top