Consolidating excel workbooks macro
Open(my Dir & fn) For Each WS In Worksheets 'Assign Variables Source WS = WS.
Then the file would close and the next would do the same.
I created the same named worksheets in the Summary workbook and put in just the Headers on Row 3.
I added the second worksheet I case you had multiple worksheets with data in them. I changed the data slightly in each worksheet so I could tell what worksheet it came from.
Close False End With flg = True fn = Dir Loop End Sub Sub Copy All WSin Dir() Dim Orig WB As String, my Dir As String, fn As String, Source WS As String Dim WS As Worksheet Dim LTarg Row As Integer, lrow As Integer, lcol As Integer Orig WB = Active Workbook. Range("D1") fn = Dir(my Dir & "*.xls") Do While fn "" 'Open Work Book With Workbooks.
If this is not what you are trying to do, please explain what you want.
In no way does claim ownership or responsibility for such items, and you should seek legal consent for any use of such materials from its owner..