I have a string in my vbscript file. I would like to execute the string as code. For example, the string could be 'msgbox("hello")'. However, the eval function only accepts numerical or string operations. How should I execute the code? I could always create a new file and write that string to the file, execute the file, and delete it, but I am looking for a better way to do this.
1 Answer
Perhaps surprisingly, you can do this with an Execute statement. It's even referenced in the documentation for the Eval function.