|
-
Jan 10th, 2000, 07:00 PM
#1
Thread Starter
Addicted Member
I had this problem today and had to use the prescribed work-around. This is from the msdn library:
You attempt to use a number in a calculation, and that number is coerced into an integer, but the result is larger than an integer. For example:
Dim x As Long
x = 2000 * 365 ' Error: Overflow
To work around this situation, type the number, like this:
Dim x As Long
x = CLng(2000) * 365
-------------
This seems a bit stupid. Can't visual basic tell that it's a Long integer. Why does this "coercing" happen. Sounds more like a glitch in the compiler to me. Does anyone know of a better work-around than the one microsoft prescribes?
Thanks in advance,
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
|