Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run-time error 6 Overflow

In debug, this gives me a run-time error 6 overflow:
?13489936500 mod 1348993650

In a spreadsheet cell, this formula returns the value 791949200:
=mod(3489936500, 1348993650)

How can I get the same value in a VBA function? I've tried several
conversions; nothing so far seems to work.

Fred***


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Run-time error 6 Overflow

Fred,

Use the Evaluate function. E.g.,

Dim Result As Double
Result = Evaluate("mod(3489936500, 1348993650)")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"FredM" wrote in message
...
In debug, this gives me a run-time error 6 overflow:
?13489936500 mod 1348993650

In a spreadsheet cell, this formula returns the value

791949200:
=mod(3489936500, 1348993650)

How can I get the same value in a VBA function? I've tried

several
conversions; nothing so far seems to work.

Fred***




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Run-time error 6 Overflow

Thank you very much Chip. This worked nicely!
Fred***

"Chip Pearson" wrote in message
...
Fred,

Use the Evaluate function. E.g.,

Dim Result As Double
Result = Evaluate("mod(3489936500, 1348993650)")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"FredM" wrote in message
...
In debug, this gives me a run-time error 6 overflow:
?13489936500 mod 1348993650

In a spreadsheet cell, this formula returns the value

791949200:
=mod(3489936500, 1348993650)

How can I get the same value in a VBA function? I've tried

several
conversions; nothing so far seems to work.

Fred***






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
Overflow error when declaring variables Jeff Excel Discussion (Misc queries) 2 January 9th 08 03:15 PM
Overflow error.. why? Fingerjob Excel Discussion (Misc queries) 4 November 13th 06 05:18 PM
runtime error '6' overflow don Setting up and Configuration of Excel 1 July 26th 05 02:52 AM
Overflow Error DG Excel Discussion (Misc queries) 3 April 15th 05 05:45 PM
VBA overflow Don Guillett[_4_] Excel Programming 2 September 2nd 03 04:19 PM


All times are GMT +1. The time now is 04:39 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"