You can use the Mod operator. This will give you the remainder of the division of any two numbers.
-
dim intRemainder as Integer
-
dim intIntegerPart as Integer
-
-
intRemainder = 12100 Mod 40
-
intIntegerPart = 12100 \ 40
intRemainder will now be holding 20 which is the remainder of the calculation.
intIntegerPart will then be holding 302 which is the integer part of the answer, make sure you use the right slash as it is the opposite direction of the normal division symbol.
Hope this helps,
Devo