Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

IIF function with long variables


Anton Jan 22, 2024 12:44 PM

The following code fragment unexpectedly produces the value 17,236,000 for n.  Could this be a bug?

Public a As Long = 17235999, b As Long = 17235031, n As Long
n = IIF(1, a, b)


Anton Jan 30, 2024 07:43 PM

It seems very much like the long values are being converted to floats and back.


Anton Feb 13, 2024 12:59 PM

Is there a volunteer who can confirm this behavior?

Log in or register to post/reply in the forum.