Hi Rob
This will open all the excel in a designated folder. You will need to
change the file path to suit and also the names of the sheets to
copy. This macro assumes you are running it from the Master
spreadsheet. Hope this helps.
Take care
Marcus
Sub CopytoXLFiles()
Dim lCount As Long
Dim wbResults As Workbook
Dim wbThis As Workbook
Dim dblValue As Double
Dim WbCnt As Long
Dim Wrkbook As String
With Application
On Error Resume Next
Set wbThis = ThisWorkbook
dblValue = 0
WbCnt = 0
With .FileSearch
.NewSearch
.LookIn = "C:\Documents and Settings\MS2642\MyXLFiles
\Personal\FoldertoOpen\" '<-Change path to suit
.FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then 'Workbooks in folder
For lCount = 1 To .FoundFiles.Count 'Loop through
all.
'Open Workbook x and Set a Workbook variable to it
Set wbResults = Workbooks.Open
(Filename:=.FoundFiles(lCount), UpdateLinks:=0)
Wrkbook = ActiveWorkbook.Name
wbThis.Activate
Sheets(Array("Test1", "Test2")).Copy
Before:=Workbooks(Wrkbook).Sheets(1)
wbResults.Activate
WbCnt = WbCnt + 1
Next lCount
End If
End With
End With
End Sub