Stan,
Sorry I believe I was a bit vague in my first post. Let me start by explaining the process more clearly.
1.) Each week I will be getting 10-20 data worksheets, of which I will not know the names, so the first step is to create code which identifies the worksheet names inside the Data Collection folder.
2.) Next I will need to collect the data from the cells A1, B6, and C9 from the first data worksheet and transfer each cell to the summary worksheet like so:
Data Summary
A1----> H1
B6----> H2
C9----> H3
3.) I will then need to collect data from the cells A1, B6, and C9 from the second worksheet and transfer them to the summary worksheet. (This is the same as step two except the data must be pasted one column over)
A1----> I1
B6----> I2
C9----> I3
4.) Finally, I must repeat this process until I have taken data from all the worksheets inside the folder.
Now to answer your questions.
The folder path is C:\Data Collection
The worksheet that I want to copy from must be determined by the VBA code since it will always be changing. The sheet inside the worksheet will always be titled "Project Profitability"
The workbook that I want to copy to will always be titled Summary.xls and the worksheet tab will be "Master Data Sheet"
The Summary.xls sheet will most likely be in the subfolder C:\Data Collection\Summary\Summary.xls
I hope this answers all of your questions with clarity. I'm a bit of a hack at VBA, but I came across this code which I think might be a start on step 1 except instead of the message box, creating the external link.
Code:
Sub FindMe()
With Application.FileSearch
.NewSearch
.LookIn = "C:\YourPathHere\"
.SearchSubFolders = True
.Filename = "*.xls" 'or any other wildcard
If .Execute() > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With
End Sub
Thanks so much for your help on this, it's way over my head!
-Max