LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Error Code 6: Overflow

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Overflow error.. why? Fingerjob Excel Discussion (Misc queries) 4 November 13th 06 05:18 PM
Overflow Error DG Excel Discussion (Misc queries) 3 April 15th 05 05:45 PM
Overflow Error DG Excel Programming 3 April 15th 05 05:45 PM
Help! Overflow Error 6 Gauthier Excel Programming 6 September 24th 04 12:57 PM
overflow error ExcelMonkey[_5_] Excel Programming 6 January 22nd 04 02:34 AM


All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"