Return value for a function.

J

Jeff

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top