|
-
May 30th, 2006, 01:25 PM
#1
Thread Starter
New Member
[RESOLVED] Opening Multiple files
I am trying to write a macro in Excel to copy data from a same cell in several different spreadsheets. All of the spreadsheets are located in the same folder in my computer. The spreadsheets are named 2006-00001, 2006-00002, 2006-00003, ...., 2006-99999. To complete this task, I am trying to do a loop to open each spreadsheet:
For i=1 to i=9:
Workbooks.Open Filename:= _
"\\brasms115\wwreports\In Process\2006\2006-0000" i ".XLS", UpdateLinks:=0
For i=10 to i=99:
Workbooks.Open Filename:= _
"\\brasms115\wwreports\In Process\2006\2006-000" i ".XLS", UpdateLinks:=0
etc...
However, I am getting the following error with reference to the i:
Compile error:
Expected: end of statement
Does anyone know the proper way to do this?
Any and all help much appreciated!
Thank you,
Ed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|