Hi --
I'm trying to create an array of objects. The number of objects needed varies from request to request, and so I assumed this would be the most efficient way to accomplish this. However, I'm getting a error that doesn't add up to me, seeing that the method I'm trying to call is explicitly a function, and not a sub(which is what the error calls it)? Anyway, take a look and post if you can help.
Class declaration excerpt:
Declaration of array:
Trying to call the aforementioned method:
Resulting Error Message:
Microsoft VBScript compilation error '800a0414'
Cannot use parentheses when calling a Sub
/heclientrg2000/calculateConcessions.inc, line 9
topBoxArray(intTopSpot).calcTop3Box(currentRS, "Q1", 10, 1, 10, 8, "current"
Thanks in advance for any help!
Paul Prewett
I'm trying to create an array of objects. The number of objects needed varies from request to request, and so I assumed this would be the most efficient way to accomplish this. However, I'm getting a error that doesn't add up to me, seeing that the method I'm trying to call is explicitly a function, and not a sub(which is what the error calls it)? Anyway, take a look and post if you can help.
Class declaration excerpt:
Code:
class topThreeBox
public currentN, previousN
public currentTop, previousTop
public function calcTop3Box(rs, strFieldName, intUpperBound, intLowerBound, intUpperValid, intLowerValid, strCurOrPrev)
***meat of function here***
end function
end class
Declaration of array:
Code:
dim i, intNumOfQuestions
for i = 2 to 13
if formObjectArray(i) then
intNumOfQuestions = intNumOfQuestions + 1
end if
next
dim topBoxArray(intNumOfQuestions)
set topBoxArray = new topThreeBox
Trying to call the aforementioned method:
Code:
topBoxArray(intTopSpot).calcTop3Box(currentRS, "Q1", 10, 1, 10, 8, "current")
Resulting Error Message:
Microsoft VBScript compilation error '800a0414'
Cannot use parentheses when calling a Sub
/heclientrg2000/calculateConcessions.inc, line 9
topBoxArray(intTopSpot).calcTop3Box(currentRS, "Q1", 10, 1, 10, 8, "current"
Thanks in advance for any help!
Paul Prewett