Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parentheses not allowed?

Status
Not open for further replies.

Dorff

Programmer
Mar 13, 2002
72
0
0
CA
I am executing a simple VBScript from my web site. The script is being executed but I get this error.

"Cannot use parentheses when calling a sub."

This is the code for the script.

Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run ("excel","return.csv")

Any ideas? Ryan
rmindorff@hotmail.com
 
remove the parenthesis

WshShell.Run "excel","return.csv"
 
Try not using parantheses when calling your sub! ie

WshShell.Run "excel","return.csv"
 
Thanks folks.....that helped, but wasn't a fix. Now I get a WScript object required error message. Ryan
rmindorff@hotmail.com
 
try this
dim iRet
Set WshShell = Wscript.CreateObject("Wscript.Shell")
iRet = WshShell.Run ("excel","return.csv")
 
Is the WScript object installed on your webserver? Brett Birkett B.Comp
Systems Analyst
 
Ran some other WSH scripts and none worked. That solves my problem. Thanks for the help everyone.

Ryan
rmindorff@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top