Okay so I read the goods on “mod” and he is my code

Dim d As Double
Dim i, x, np As Integer

…other code

If x < 22 then
d = (canvisWP / pjWidth)
np = CType(d, Integer)
i = canvisWP mod pjWidth
if i >0 then
numProjectors = (np +1)
end if

txtNumberOfProjectors.text = str(numProjectors)

else
// add error handle for too many PJs
end

When I run the app and input number (canvisWP (Integer) is 11667) and (pjWidth (Integer) is 1920) I assume mod would result with “1” but I get 467, what gives?

Ok two things, first my second number in the above example was supposed to be 1400 not 1920, 1920 is etched in my brain. Second, I was totally misunderstanding result of Mod, but I get it now after a nights sleep. I was doing the math on a calculators 11667/1400= 8.3335… So I was seeing the remainder as .3335 and since it was being place in an integer, I was thinking it would be rounded to 1. I forgot to take into account what the .3335 really represented.

John,
Great to hear from you (yes I stay invisible these days). And yes, the extra projectors is what I am testing for (on a blend). The routine works since ‘i’ is greater then 0 in my example.