Re: "Cannot use parentheses when calling a Sub" runtime error

From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 09/16/04


Date: Thu, 16 Sep 2004 11:25:58 -0400

Throxy wrote:
> The routine has a series of "Set" statements, so I know if putting
> Call in front, or replacing Set with Call will work.

No!!! Do not replace Set with Call. They do two different things!

None of the lines using Set involve calls to subroutines. You need to read
up on the difference between subs and functions.

> Below is the
> code:
>
> ***************************************************
>
<snip of irrelevant HTML.>
> <SCRIPT LANGUAGE="VBSCRIPT">
> '-- Groupwise Constants:
> const egwTo = 0
> const egwCC = 1
> const egwBC = 2
> '-- Global Groupwise Variables
> Dim GroupWise 'As Variant
> Dim vCommander 'As Variant
> Dim Account 'As Variant
> Dim Folder 'As Variant
> Dim StopFlag 'As Variant
>
> xmlFile =
> window.showModalDialog("template_selection.htm","","dialogHeight:10")

A quick scan did not reveal any invalid sub calls.
I suspect the problem may be in template_selection.htm

Bob Barrows

-- 
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Relevant Pages

  • Re: shape range help
    ... However initial use of Dim() avoided use of brackets and he ... Everytime with ReDim only, I get a Variant() ... never in a session I don't do the initial Dim varr() then redim does NOT ...
    (microsoft.public.excel.programming)
  • Re: Coding with varsortby and options
    ... Dim varhowsort As Variant ... DoCmd.OpenReport stDocName, acViewPreview ...
    (microsoft.public.access.formscoding)
  • Re: shape range help
    ... However initial use of Dim() avoided use of brackets and he ... Everytime with ReDim only, I get a Variant() ... Dim Stooges As ShapeRange ...
    (microsoft.public.excel.programming)
  • Re: OPENFILENAME A P I. User cancels ?
    ... The variable FName will be a Boolean False if no file was selected or a String containing the fully qualified file name if the user selectes a file. ... Const ahtOFN_OVERWRITEPROMPT = &H2 ... Function GetOpenFile(Optional varDirectory As Variant, ... Dim strFilter As String ...
    (microsoft.public.excel.programming)
  • Re: Coding with varsortby and options
    ... Dim varhowsort As Variant ... DoCmd.OpenReport stDocName, acViewPreview ...
    (microsoft.public.access.formscoding)