Quote Originally Posted by Code Doc View Post
I do not see how using longs rather than integers could ever result in more efficient code unless the upper bound is exceeded and stops the program dead in its tracks.
Hi Doc!

I was just following this tip from the manual:

Quote Originally Posted by MSDN
Use Long Integer Variables and Integer Math

For arithmetic operations avoid Currency, Single, and Double variables. Use Long integer variables whenever you can, particularly in loops. The Long integer is the 32-bit CPU's native data type, so operations on them are very fast; if you can’t use the Long variable, Integer or Byte data types are the next best choice.
I usually tend to favor speed over memory. That's why I typically use the appropriate type for my variables, constants and numeric literals even if they consume more memory. As mentioned already by Doogle, I prefer to avoid run-time data type conversions whenever possible.