View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Error Code 6: Overflow

I disagree..

Overflow errors are typically generated in VBA when assigning
values to variables that dont have enough bits to hold the data.

e.g.

integer values to byte variables.
long values to integer variables.

most often this happens when you are "looping" row numbers
and use an integer variable..

once you get to row 32768 +1 the error will pop..
as an integer can only hold 16bit (2byte) data.




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Nigel wrote :

The overflow is caused by the contents of the ranges / cells you
refer to. Assuming the code is logically correct it is impossible to
resolve your problem here. Check the logic and the math based on
cell contents if necessary do a manual calculation. If the condition
causing the overflow is likely to arise then you need some error
trapping and / or conditional logic to prevent the problem.