Peter said:
I misinterpreted the Help file! Thank you.
I'm not sure this is explained all that well in the Help file? The thing to
always keep in mind is that VB/VBA will always use the "smallest" datatype
it thinks it can to calculate intermediate results. IOW, if you're
multiplying two Integer values, VB/VBA will attempt to store the result in
another 2-byte Integer before assignment. If you multiply an Integer and a
Long, the intermediate storage allocated will be a 4-byte Long. This is
actually a Good Thing, because were this not the case, you'd essentially be
asking VB to consider far more possibilities before doing each math
operation, thus frequently slowing down the entire process needlessly. As
it is, *you* make the call on datatype, and live with the
results/consequences.