Hello all,
I am new to VBA. I need a macro to look at all .xls files in a directory and combine the data to a single master sheet. I also need it to unhidde all the columns before copying the data before copying it to the master sheet. I tried the code below but I am just getting errors. I am using excel 2010.
[CODE] Sub Combine()
Fpath = "C:\Users\Documents\Service Partners Alliance\Robin Sing\consolidation"
Fname = Dir(FilePth & "*.xls")
Do While Fname <> ""
Workbooks.Open Fpath & Fname
Sheets("Detail - 05-2012").Copy After:=Workbooks("Master.xlsm").Sheets(Workbooks("Master.xlsm").Sheets.Count)
Workbooks(Fname).Close SaveChanges:=False
Fname = Dir
Loop
End Sub [CODE]
Thanks in advance.
Bookmarks