Error:Cannot use parens when call Sub HELP 
Author Message
 Error:Cannot use parens when call Sub HELP

HELP!

I'm working on a VBScript/ ASP application using SPSS (a statistical
package) controls. When I execute the following command in the SPSS
environment, everything works fine and it correctly produces an html page of
the output. When I attempt to do the same command via an ActiveX call in a
ASP, I get the message

Microsoft VBScript compilation error '800a0414'
Cannot use parens when call Sub

Here's the command line:

objOutputDoc.ExportDocument(SpssAll,"c:\output1.htm",SpssFormatHtml,True)

SpssAll and SpssFormatHtml are defined as constants, and equal 0. These tell
SPSS to export everything and to do it in html format.

Any suggestions would be VERY helpful.

Jim Luther



Fri, 14 Sep 2001 03:00:00 GMT  
 Error:Cannot use parens when call Sub HELP
Seems like a complex error, but the solution is usually pretty intuitive
once you get around it once.  Try removing the parens:

doc = "c:\output.htm"
objOutputDoc.ExportDocument SpssAll,doc,SpssFormatHtml,True

--

   ________________________________________
   aaron bertrand [mvp]
   http://www.swynk.com/friends/bertrand/



Fri, 14 Sep 2001 03:00:00 GMT  
 Error:Cannot use parens when call Sub HELP
The other alternative is to use the keyword call in form

call objOutputDoc.ExportDocument (SpssAll, doc, SpssFormatHtml, True)

--
_____________________________________________________
Dan Jump
Senior Software Designer
Descry LTD
888-633-7279
http://www.descry.com



Quote:
> Seems like a complex error, but the solution is usually pretty intuitive
> once you get around it once.  Try removing the parens:

> doc = "c:\output.htm"
> objOutputDoc.ExportDocument SpssAll,doc,SpssFormatHtml,True

> --

>    ________________________________________
>    aaron bertrand [mvp]
>    http://www.swynk.com/friends/bertrand/



Sun, 23 Sep 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP: Cannot use parens when calling sub.

2. Help with 'cannot use parens' error

3. ASP ERROR: 'Cannot use parens when calling a Sub'

4. Calling a sub or function using a variable through another sub or function

5. Cannot use parentheses when calling Sub

6. Cannot use parentheses when calling a sub?

7. Cannot use parentheses when calling a sub

8. ErrMsg: Cannot use parentheses when calling a Sub

9. Cannot use parenthesis when calling a sub

10. Cannot use parentheses when calling a Sub

11. To Microsoft: Sub cannot be called (VP6, SP5) - production customer issue

12. Bad Calling Convention error 49 - due to calling a Sub in a .bas module

 

 
Powered by phpBB® Forum Software