Macros Help

kyliebish

New Member
Joined
Feb 17, 2025
Messages
1
Office Version
  1. 2010
Platform
  1. Windows
I started at a new position where the Marcos were already created and the creator does not work here anymore. Everything was good until my software where I pull the reports randomly changed all downloads from "Microsoft Excel 97-2003 Workbook" to "Microsoft Excel Workbook." Keep in mind that I download over 50 so its not as easy as just changing the type. When I go to run my macro now, I hit play and it does nothing...I am hoping you can help. What I need is to pull the 12 different reports from one file into one excel that is separated by tab. Here is what I use now:
Sub GetSheets()
'Update ExcelJunction.com
Path = "/"
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

Where I plug the path for the folder in. I need it to now be able to read .xlsx instead of .xls without changing each file...
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top