B
bac
Presently it opens a specific folder, and pulls sheet 9 of all
spreadsheets into a new spreadsheet called Master 1. I would like for
the user to select the folder, rather than having a specific path
identified in the macro.
This is the Macro I would like to change.
Sub Combine()
Fpath = "C:\home\xxxxxxxxxxxxx\xxxxxxxx\4010\" ' change to suit
your directory
fName = Dir(Fpath & "*.xls")
Do While fName <> ""
Workbooks.Open Fpath & fName
Sheets(9).Copy
after:=Workbooks("Master1.xls").Sheets(Workbooks("Master1.xls").Sheets.Count)
Workbooks(fName).Close savechanges:=False
fName = Dir
Loop
End Sub
I'll really appreciate any help with problem!
thanks
spreadsheets into a new spreadsheet called Master 1. I would like for
the user to select the folder, rather than having a specific path
identified in the macro.
This is the Macro I would like to change.
Sub Combine()
Fpath = "C:\home\xxxxxxxxxxxxx\xxxxxxxx\4010\" ' change to suit
your directory
fName = Dir(Fpath & "*.xls")
Do While fName <> ""
Workbooks.Open Fpath & fName
Sheets(9).Copy
after:=Workbooks("Master1.xls").Sheets(Workbooks("Master1.xls").Sheets.Count)
Workbooks(fName).Close savechanges:=False
fName = Dir
Loop
End Sub
I'll really appreciate any help with problem!
thanks