View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brad[_13_] Brad[_13_] is offline
external usenet poster
 
Posts: 8
Default Overflow in VBA, but value < limit

Okay, Iıve declared a value ³total² as Long ...

The following causes an overflow ... Of the long integer ³total²

total = 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2


But

Total = 2 ^ 16


Does not ... Is there a limit to the number of multiply signs I can include
in a line??

Obviously, Iım not doing this actual sum in my macro multiplies together a
number of variables (a, b, c, e ... Etc)

How can I overcome this limitation?

Cheers,

Brad.)