chieftan999
MIS
Hi,
I am a real newbie at this. I am trying to save a Basic VBscript file I have written as a test for an If statement and it says it cant because of the following error:-
"There is no script file specified"
I have tried to save this as a .wsh extension and am currently running windows XP. The code (Very basic) is as follows:-
Option Explicit
Dim MyVar
Dim MyInput
Dim Shell
Set Shell = WScript.CreateObject("WScript.Shell")
MyInput=InputBox("Enter a name","Name")
If MyInput="clive" then
MsgBox("Hello " & MyInput)
Else
MsgBox("Incorrect name " & MyInput & ". It should be clive")
End If
Can anyone explian why I get the error message when trying to run this script.
Thanks in advance
I am a real newbie at this. I am trying to save a Basic VBscript file I have written as a test for an If statement and it says it cant because of the following error:-
"There is no script file specified"
I have tried to save this as a .wsh extension and am currently running windows XP. The code (Very basic) is as follows:-
Option Explicit
Dim MyVar
Dim MyInput
Dim Shell
Set Shell = WScript.CreateObject("WScript.Shell")
MyInput=InputBox("Enter a name","Name")
If MyInput="clive" then
MsgBox("Hello " & MyInput)
Else
MsgBox("Incorrect name " & MyInput & ". It should be clive")
End If
Can anyone explian why I get the error message when trying to run this script.
Thanks in advance