venkat_m
08-11-2010, 01:05 AM
Hi all,
I am new to VB scripting and when i tried to execute below code, getting error as Expected 'End'. Please correct my code. thanks
Option Explicit
Function Amount( a,b)
Dim x,y
Tax =0.6
Amount = x+y*0.6
End Function
Dim Result
Result=Amount(2,4)
If Result <4 Then
msgbox("Amount is lessthan 4:")
Else if Result >4 Then
msgbox("Amount is Greaterthan 4:")
Else
msgbox("Amount is Equal to 4:")
End If
I am new to VB scripting and when i tried to execute below code, getting error as Expected 'End'. Please correct my code. thanks
Option Explicit
Function Amount( a,b)
Dim x,y
Tax =0.6
Amount = x+y*0.6
End Function
Dim Result
Result=Amount(2,4)
If Result <4 Then
msgbox("Amount is lessthan 4:")
Else if Result >4 Then
msgbox("Amount is Greaterthan 4:")
Else
msgbox("Amount is Equal to 4:")
End If