Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function to calculate GST
#1
Solved: 11 Years, 4 Months ago
Hey guys,

Ive written a very simple function to check whether the GST that is calculated on a website is correct or not. The website displays the total value (cost including GST) and also the GST price seperately. Im just taking these values and inputting them into the following function -

Code:
Function Check_GST (theTotal, theGST)

standardGST = Get_GST(theTotal) [i](another function that i'm calling)[/i]
actual = theTotal - theGST
If (actual = standardGST )Then
    msgbox "this is tue"
else
    msgbox "this is NOT true"
End If    

End Function


Im calling this function from my script as -
Check_GST (total, GST)

but im getting the following syntax error message -
"Cannot use parentheses when calling a Sub"

Does anyone know why im getting this error and how i can rectify it?
Thanks,
Brian
Reply
#2
Solved: 11 Years, 4 Months ago
use call statement...
Code:
standardGST = Call Get_GST(theTotal).

There are two ways one can call procedures
1) By using Call statement.
if you use call statement, then Call some_function_name(param)
2) Without Call statement
some_function_name param
Reply
#3
Solved: 11 Years, 4 Months ago
Thanks,
works now!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a function in a Test Script from a function library anupam4j 3 6,113 06-26-2015, 12:31 AM
Last Post: babu123
  Question how to calculate formula in the data sheet Arlequin 2 3,690 10-02-2010, 03:34 AM
Last Post: Arlequin
  To calculate the page load time using a user defined function Renu0113 3 6,664 09-30-2009, 09:59 AM
Last Post: Saket
  How to calculate total no of Edit box sudhirzpatil 5 4,256 02-04-2009, 03:53 PM
Last Post: Prafulla

Forum Jump:


Users browsing this thread: 1 Guest(s)