Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi keepITcool,
You are right of course, but my assertion was that the values in the cells being assigned causes the error to arise in VBA. There would be no overflow if the values remain within the scope of the type declaration. -- Cheers Nigel "keepITcool" wrote in message .com... 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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Overflow error.. why? | Excel Discussion (Misc queries) | |||
Overflow Error | Excel Discussion (Misc queries) | |||
Overflow Error | Excel Programming | |||
Help! Overflow Error 6 | Excel Programming | |||
overflow error | Excel Programming |