I execute a VBScript, using WScript.Sleep and WScript.Echo, at the command line with successful results. However, when I execute the same script from an application, I get the following VBScript run-time error message:
Object Required 'WScript'
As a matter of fact, any reference to WScript (WScript.CreateObject, WScript.Sleep, WScript.Echo, etc) generates the same error message. All feedback appreciated.
Thanks.
Here is a simple script I wrote to test:
dim WshShell
set WshShell = CreateObject("WScript.Shell"
WScript.Sleep 500
WScript.Echo "Successful!"
Object Required 'WScript'
As a matter of fact, any reference to WScript (WScript.CreateObject, WScript.Sleep, WScript.Echo, etc) generates the same error message. All feedback appreciated.
Thanks.
Here is a simple script I wrote to test:
dim WshShell
set WshShell = CreateObject("WScript.Shell"
WScript.Sleep 500
WScript.Echo "Successful!"