Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

edblanchard

macrumors newbie
Original poster
Jun 10, 2013
1
0
This works on both Mac office 2011 and MS Offcie on a PC
call with 2 and 3.5 you get 5 ok for integer
Function Add(Number1 As Integer, Number2 As Integer) As Integer
Add = Number1 + Number2
End Function

This works on MS Office PC but gets a crazy big number on the MAC
about 18 trillion
Function Add(Number1 As Currency, Number2 As Currency) As Currency
Add = Number1 + Number2
End Function

Any one have an idea?
Also it is correct in the debugger until the return. This example is simple. I have very complex functions that do not work under the same conditions.
 
Last edited:
I got the same results. If you change the function definition to Add(...) as Double it seems to work ok. The currency data type is a double floating point number.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.