I have a VBA shell script that worked just fine on another computer, but now it won't run.
The code that won't execute is:
This gives the error message: "Compile Error: Expected procedure, not variable", which to me indicates that the Shell command is not recogniced.![]()
Please Login or Register to view this content.
Have also teste a bunch of other syntaxes (eg. using WScript). This returns other errors (eg. Variable not defined for WScript)
As the code worked before (on another computer) and none of the other shell syntaxes works, I suspect that the problem is related to a dependency to a library reference, or that there is some kind of a conflict between different libraries that uses Shell as a keyword. I have activated "Microsoft Shell Controls And Automatation" and some other libraries that i hoped would work, but so far without any luck.
Does anyone know how to solve this?
Bookmarks