Return value for a function.
Whoops, I forgot X3 was an integer. Just ignore this post, sorry!
"Jeff" wrote:
Hi,
My function returns an integer and I want it to return the double value.
Sub testFunction()
dim x7 as double
x7 = 6543.54384
X3 = MaxValue(55, x7)
'but X3 = 6544 not 6543.54384 like I want
Function MaxValue(a, b)
If a < b Then
MaxValue = b
Else
MaxValue = a
End If
End Function
|