Loop through Files in Folder on Mac

VBA Dir is fixed now in the latest updates if you use 2019 or higher or Microsoft 365, you can use Dir now to loop through files in a folder and use wildcards to filter to only loop through the files you want. See the basic example below that create a new file with a list of all the files in the folder that you select when you run the code.

Example with MacScript for Excel 2011 and higher

Download this example workbook with and example that is working in Excel 2011 and higher that use a custom function that use AppleScript.
Download MacGetFiles.zip
11/11/2024
Web design by Will Woodgate