stucklikechuck
New Member
- Joined
- Jan 16, 2015
- Messages
- 2
Sounds pretty basic, I've got multiple identical workbooks with a number of identically formatted (header rows & sheet names) sheets in each workbook. All workbooks are in one directory and i cant seem to consolidate all the data from each sheet within each workbook to a master workbook. I just want the data, nothing to complicated. I've scoured this forum for an hour and half and everything recommended seems a little scenario specific for me to understand what the codes doing. Tried many recommendations to no avail. I'm close with
but i get a compiler error about cant assign to read only property. Tried False to no avail and none of the workbooks are read only. I also clicked a few ads.
Code:
Sub GetSheets()
Path = "C:\Users\Manda Banxx\Desktop\Nut Facts\all\"
Filename = Dir(Path & "*.xls")
Do While Filename <> ""
Workbooks.Open Filename:=Path & Filename, ReadOnly:=True
For Each Sheet In ActiveWorkbook.Sheets
Sheet.Copy After:=ThisWorkbook.Sheets(1)
Next Sheet
Workbooks(Filename).Close
Filename = Dir()
Loop
End Sub
but i get a compiler error about cant assign to read only property. Tried False to no avail and none of the workbooks are read only. I also clicked a few ads.