I am unable to execute a shell file from Excel VBA in OSX Sonoma.
Have been down a long rabbit hole and here is where I am stuck.
wResult = AppleScriptTask("GetData.scpt", "", "")
This line throws an Run-time error '13': Type mismatch
Things I have tried:
wResult is currently a variant, I have tried it as a string. I have tried all of the input parameters as variant and string variables.
I have confirmed that the scpt file is in the proper directory:
/users/Otis/Library/Application Scripts/com.microsoft.excelI have confirmed that the scpt file has permissions adjusted:
-rwxrwxrwx@ 1 Otis staff 486 Jan 27 17:34 GetData.scptI have confirmed the properties of the file being called by the scpt file
-rwxrwxrwx@ 1 Otis staff 20657 Feb 18 08:34 GetData.shScript Editor and Excel have full disk access.
Under Privacy & Security -> Accessibility Script Editor, Automator, and Excel are enabled to control the computer
The sctp file works perfectly when called from Sript Editor and from a command line.