I have an Excel file that makes heavy use of the MacScript command, which has been deprecated in Excel 2016.

I attempted to use the new AppleScriptTask command as explained in this StackOverflow thread: https://stackoverflow.com/questions/...49324#30949324

In VBA, I get run-time error 5 - Invalid procedure call or argument.


Here's where I put the script file:

script location.jpg


Here's what the script file contains:

script.jpg


Here's the VBA code

vba.jpg


The run-time error is on the AppleScriptTask statement. Any ideas?