|
-
Aug 21st, 2001, 12:45 AM
#1
Overflow!!!
I write the follow code:
Code:
Dim a As Double
a = 20001 * 8
It will have overflow error, however, as 20001 * 8 = 160008, if I assign a directly to 160008, it will be fine, i.e.
I think the problem is come from the * operator, but how could I solve this?? I really need to handle such a big value..
-
Aug 21st, 2001, 01:01 AM
#2
Registered User
The explanation why the following works is here:
http://www.vbforums.com/showthread.p...274#post455274
The following will force the intermediate result to be held in a double:
VB Code:
Private Sub Command1_Click()
Dim a#
a = 20001# * 8
MsgBox a
End Sub
-
Aug 21st, 2001, 01:02 AM
#3
PowerPoster
Damn speed typist Nucleus
-
Aug 21st, 2001, 01:08 AM
#4
Registered User
Not bad for a 2-4 finger typist .
-
Aug 21st, 2001, 01:15 AM
#5
Thank Nucleus, it work now!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|