[COLOR=darkblue]Option[/COLOR] [COLOR=darkblue]Explicit[/COLOR]
[COLOR=darkblue]Sub[/COLOR] CopyToMultipleWorksheets()
[COLOR=darkblue]Dim[/COLOR] wb [COLOR=darkblue]As[/COLOR] Workbook
[COLOR=darkblue]Dim[/COLOR] strPath [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]String[/COLOR]
[COLOR=darkblue]Dim[/COLOR] strFilename [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]String[/COLOR]
[COLOR=green]'===================================[/COLOR]
[COLOR=green]'edit here[/COLOR]
strPath = "[COLOR=Red]c:\temp\folder1\[/COLOR]"
[COLOR=green]'===================================[/COLOR]
[COLOR=green]'check for end backslash[/COLOR]
[COLOR=darkblue]If[/COLOR] Right(strPath, 1) <> "\" [COLOR=darkblue]Then[/COLOR] strPath = strPath & "\"
[COLOR=darkblue]On[/COLOR] [COLOR=darkblue]Error[/COLOR] [COLOR=darkblue]GoTo[/COLOR] errHandler
Application.ScreenUpdating = [COLOR=darkblue]False[/COLOR]
[COLOR=green]'get the first filename[/COLOR]
strFilename = Dir(strPath & "*.xl*")
[COLOR=green]'loop through all Excel files in the folder[/COLOR]
[COLOR=darkblue]Do[/COLOR] [COLOR=darkblue]Until[/COLOR] strFilename = ""
[COLOR=green]'open the file[/COLOR]
[COLOR=darkblue]Set[/COLOR] wb = Workbooks.Open(strPath & strFilename)
[COLOR=green]'copy and paste[/COLOR]
ThisWorkbook.Sheets("[COLOR=Red]Sheet1[/COLOR]").Range("[COLOR=Red]L1:N500[/COLOR]").Copy _
Destination:=wb.Sheets("[COLOR=Red]Sheet1[/COLOR]").Range("[COLOR=Red]L1[/COLOR]")
[COLOR=green]'close the file[/COLOR]
wb.Close SaveChanges:=[COLOR=darkblue]True[/COLOR]
[COLOR=green]'get the next file[/COLOR]
strFilename = Dir()
[COLOR=darkblue]Loop[/COLOR]
errHandler:
Application.ScreenUpdating = [COLOR=darkblue]True[/COLOR]
Application.CutCopyMode = [COLOR=darkblue]False[/COLOR]
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]Sub[/COLOR]