VBA & Macro Problems

Fix Excel VBA Error 75 When Creating an AppleScript File on macOS

Jason MillerJason Miller Nov 18, 2026 869 views

Question details

Create an AppleScript file in Excel's macOS Application Scripts folder so that Excel VBA can use it.

Fix Excel VBA Error 75 When Creating an AppleScript File on macOS
Product
Microsoft Excel for Mac
Device & OS
macOS
Scenario
An Excel VBA macro needs an AppleScript file in the com.microsoft.Excel Application Scripts folder.
Observed behavior
VBA can read files in the folder but returns run-time error 75, Path/File access error, when attempting to create a new .scpt file.
Before you start

Check that Excel's scripts folder exists at ~/Library/Application Scripts/com.microsoft.Excel. Plan the script's handler name and parameter before saving it; AppleScriptTask requires both the file name and handler name.

Solution 1Recommended

Save the AppleScript with Script Editor and call it from Excel VBA

Use a user-authorized app to place the script in Excel's scripts folder, then call its handler from VBA.

macOS sandboxing or permissions can prevent Excel VBA from creating a file even when Excel can read existing files. Saving the script separately avoids relying on VBA to write to the protected location.

AppleScriptTask is available in supported versions of Excel for Mac. The script file must already be in Excel's Application Scripts folder.

1
Create a script

Open Applications > Utilities > Script Editor. Enter a handler, for example: on greet(userName) return "Hello, " & userName end greet

2
Save it in Excel's folder

Choose File > Save. In the save dialog, press Command+Shift+G and enter ~/Library/Application Scripts/com.microsoft.Excel. Save the file as Hello.scpt in Script format. If macOS requests access, review and approve the prompt as appropriate.

3
Call the handler from VBA

In the Excel VBA editor, add a call such as result = AppleScriptTask("Hello.scpt", "greet", "World") to a macro, then run the macro. The file name and handler name must match the saved script.

4
Check automation access if needed

If the script controls another app and macOS blocks it, open System Settings > Privacy & Security > Automation and review the relevant permission. Also check any error displayed by Script Editor or Excel.

Save the AppleScript with Script Editor and call it from Excel VBA
Unattended deployment: VBA cannot reliably bypass macOS sandbox restrictions. For unattended use, deploy the script or an authorized helper through an approved process; files stored outside Excel's scripts folder cannot be called directly by AppleScriptTask.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight alternative for everyday spreadsheet work. Its familiar interface and support for Microsoft Excel formats make it easier to move existing files between office suites. It does not fix Excel's macOS sandbox permissions or guarantee compatibility with Excel VBA and AppleScriptTask.

Open and edit common Excel formats, including XLSX and XLSUse a familiar spreadsheet interface for everyday workbook tasksMove existing spreadsheets into a lightweight office suiteWork with spreadsheets without relying on Excel's AppleScript integration
microsoft office alternative - wps office

Frequently Asked Questions

Why can Excel VBA read the folder but not create a script there?

Reading an existing file and creating a new one can be subject to different macOS sandbox or permission restrictions. Save the script with Script Editor instead of assuming VBA has write access.

Where should I save an AppleScript for AppleScriptTask?

Save the .scpt file in ~/Library/Application Scripts/com.microsoft.Excel. In a Finder or save dialog, press Command+Shift+G and enter that path.

Can I call a script stored elsewhere with AppleScriptTask?

AppleScriptTask expects the script in Excel's Application Scripts folder. A file stored elsewhere may be useful for another workflow, but it cannot be called directly by AppleScriptTask from that location.

Will granting Automation permission fix error 75?

Not necessarily. Automation permission controls whether an app can control another app; it does not automatically grant Excel permission to create files in the scripts folder. Check System Settings > Privacy & Security > Automation only when the script needs to control another app.