Text and meaning of the error
This error can occur when working with VBS-scripts in Studio Pro (the Execute macro activity). The error message looks the following way:
Error at Execute macro in {name of executed neek file}.neek
C:\Users\rpaadmin\AppData\Roaming\ElectroNeek\studio\excel_macros_location\{id of script}.vbs
(5, 1) Microsoft VBScript compilation error: Syntax error
There are two possible reasons for this error to appear:
- Incorrect VBS-code: mistakes, typos, incorrect syntax, referring to a non-existent list in MS Excel.
- Using VBA-macros instead of VBS.
Solution
Mistakes (typos, incorrect syntax, referring to non-existing list in MS Excel)
Make sure that your code is correct - refer to the Execute macro article to learn more about using macros in Studio Pro.
Using VBA-macros instead of VBS
Studio Pro supports working with VBS-macros only. If you run the macro created in MS Excel - make sure to change the internal Excel variables (xlPasteAll
, xlNone
, xlWhole
etc.) to their numeric values according to this table.