Forum Discussion
HKosova
11 years agoSmartBear Alumni (Retired)
Ah, I see what you mean. The reason for this is that the Evaluate dialog works like Eval, not like Execute. So, you get an error for "Dim varname" because Eval("Dim varname") causes an error in VBScript.
To run arbitrary statements, wrap them in Execute():
To run arbitrary statements, wrap them in Execute():
By the way, unless you use Option Explicit, Dimming variable is optional (although, recommended). If a script uses an unDimmed variable, the VBScript engine will automatically create this variable in the global scope.
Related Content
- 8 years ago
- 11 years ago
Recent Discussions
- 5 hours ago
- 21 hours ago
Working with Visual Test
Solved3 days ago