Mod Function

Mik3

Registered User.
Local time
Today, 10:12
Joined
Jul 10, 2003
Messages
60
Hi,
I have a question about the Mod function in the Expression Builder.
Is that the modulus of number (ie. returns the positive value of any number)?
What is the syntax to use it? Brackets, square brackets...?
 
The MOD function gives you the whole number remainder after dividing.

For an example, put this into a blank module and run it:

Public Sub Test1()

MsgBox (32 Mod 9), vbExclamation

End Sub


The message box will return 5 (32/9 = 3.555555 but 32-27=5 which is the whole number remainder after dividing 32 by 9)
 
I see. It is the Abs function I needed.
Thanks.
 

Users who are viewing this thread

Back
Top Bottom