Fix Excel 2016 for Mac VBA Workbook Saving Problems
Question details
The user needs a VBA macro to save workbooks into a subfolder in Excel 2016 for Mac.

- Product
- Microsoft Excel 2016 for Mac
- Device & OS
- macOS
- Scenario
- A VBA macro uses AppleScript to create a folder and then saves workbooks into a subfolder.
- Observed behavior
- The macro mostly works, but it does not save files into the intended subfolder. Mac sandbox permissions, path separators, and filename parsing may need to be checked.
Identify the intended destination folder and confirm that it exists in Finder. In the VBA editor, locate the code that builds the destination path and calls SaveAs.
Check Folder Access and the VBA Save Path
Use this approach when a macro creates a folder but saves a workbook to the wrong location or cannot access the destination.
In Excel, choose File > Save As and try saving a test workbook in the intended subfolder. If Excel requests access, grant it; if the folder is unavailable, check its location and permissions in Finder.
Open the VBA editor and add a Debug.Print statement immediately before the SaveAs call to print the full destination path. Run the macro and inspect the output in the Immediate window.
Compare the printed path with the intended folder and filename. Use slash-separated POSIX paths where the called API expects them, and colon-separated HFS paths where required; update Split or InStrRev calls to match the path format being parsed.
Check that the SaveAs Filename argument includes the subfolder, a separator, and the complete filename. Set FileFormat to match the extension, such as 52 for a macro-enabled .xlsm workbook, and rerun the macro.

Use an Accessible Folder and Convert AppleScript Paths
Use this approach if sandbox access or an AppleScript path conversion is preventing the macro from reaching the target folder.
Work With Excel Spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and support for common Excel formats, making it easier to move everyday spreadsheet work. It does not fix Excel for Mac sandbox permissions, and VBA compatibility may vary.

Frequently Asked Questions
Should I change all colons in my Mac VBA paths to slashes?
Not automatically. Slashes are used in POSIX paths, while colons can separate components in HFS paths. Check which format the specific VBA or AppleScript operation expects, and adjust filename parsing to match.
How can I see the path my macro is trying to save?
Add Debug.Print immediately before the SaveAs call and print the full Filename value. Run the macro and inspect the Immediate window in the VBA editor.
What if Excel cannot access the destination folder?
Try File > Save As in Excel and grant access if prompted. Check the folder's permissions in Finder, or test with an appropriate folder inside Excel's sandbox container.
Which format should I use to keep a workbook's VBA macros?
Save the workbook as .xlsm and use the matching macro-enabled FileFormat in the VBA SaveAs call, such as 52.




