Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Troubleshoot Overflow

I have read that the Overflow Error is frequently associated with
variable declaration. Do you have any suggestions, other than trial
and error in changing declarations, for troubleshooting this error?
Thanks for your help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Troubleshoot Overflow

Formulate expresions to demand Double or Long math:

Sub bad_math()
MsgBox (24 * 60 * 60)
End Sub

will fail on overflow, but:

Sub good_math()
MsgBox (24# * 60 * 60)
End Sub

will work just fine.
--
Gary''s Student - gsnu200785


"JingleRock" wrote:

I have read that the Overflow Error is frequently associated with
variable declaration. Do you have any suggestions, other than trial
and error in changing declarations, for troubleshooting this error?
Thanks for your help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Troubleshoot Overflow

hi
nope. this is one case where experience really does help but even so,
everyone hits an "oops" now and then
best way is to think out your declarations before hand.
in vb help look up data type summary for most of the fine points.

Regards
FSt1

"JingleRock" wrote:

I have read that the Overflow Error is frequently associated with
variable declaration. Do you have any suggestions, other than trial
and error in changing declarations, for troubleshooting this error?
Thanks for your help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Troubleshoot Overflow

Don't use "As Integer"; use "As Long".

Don't use "As Single"; use "as double".



JingleRock wrote:

I have read that the Overflow Error is frequently associated with
variable declaration. Do you have any suggestions, other than trial
and error in changing declarations, for troubleshooting this error?
Thanks for your help.


--

Dave Peterson
Reply
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
Troubleshoot rwtrader Excel Worksheet Functions 2 June 4th 10 03:49 PM
SUM troubleshoot Dee Excel Discussion (Misc queries) 2 March 8th 10 04:55 AM
Troubleshoot LOOKUP, please Connie Martin Excel Worksheet Functions 5 November 2nd 09 08:59 PM
Troubleshoot help Whitney Excel Discussion (Misc queries) 3 April 3rd 08 11:03 PM
Troubleshoot a bug in Excel [email protected] Excel Discussion (Misc queries) 1 October 17th 05 02:59 AM


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

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

About Us

"It's about Microsoft Excel"