Run-time error 6 Overflow

  • Thread starter Thread starter FredM
  • Start date Start date
F

FredM

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***
 
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
 
Back
Top