I m trying to loop through all the excel files in the folder and copying data from two specific cells of each excel file and consolidate that in Summary sheet.
for.eg.
Column A Column B
Sheet A : Field A Field B
Sheet B : Field A Field B
Summary Sheet
Column A Column B Column C
Sheet A Field A Field B
Sheet B Field A Field B
Currently I m stuck with below code and I will appreciate any help.
Option Explicit
Sub Test()
Dim wbk As Workbook
Dim filename As String
Dim Path As String
Dim myobj As Object
Path = "H:\2013\consolidate\"
filename = Dir(Path & "*.xlsx")
'--------------------------------------------
'OPEN EXCEL FILES
Do While Len(filename) > 0 'IF NEXT FILE EXISTS THEN
Set wbk = Workbooks.Open(Path & filename)
????
wbk.Close True
filename = Dir()
Loop
End Sub
Bookmarks