Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Timer causes run-time error '6' overflow
I'm using Timer to profile some code. For no reason I can think of
I'm getting overflow when trying to call Timer to get the time value. Why would this happen? If I enter debug mode and press continue, the error goes away. Thanks, Brian |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Timer causes run-time error '6' overflow
Brian,
Post your code? Bernie MS Excel MVP "Brian Murphy" wrote in message ... I'm using Timer to profile some code. For no reason I can think of I'm getting overflow when trying to call Timer to get the time value. Why would this happen? If I enter debug mode and press continue, the error goes away. Thanks, Brian |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Timer causes run-time error '6' overflow
It's a really long bit of code.
I've used Timer quite often to profile code. I've never had this problem before. The way I generally use it is like this: Dim startTime as Double startTime = Timer .... code being timed goes here ... Debug.Print (Timer - startTime) The overflow happens on the second call to Timer. I tried all different manners of data types and such, with no luck. If I enter debug mode and press F5, the code continues running with no problem until it comes back to this same line again. It just doesn't make any sense. After some more work on this I think I've got a clue. I found that if I move the .Print line up far enough it will run. The error starts right after a VBA call to a routine in compiled DLL (it's in Fortran). The error will stop happening if the Timer call is after a line that puts data in a cell on a worksheet. Somehow the call to the DLL seems to lock up the Timer, but putting data onto a worksheet unlocks it. Could this be possible? Brian On Dec 11, 10:03*pm, "Bernie Deitrick" <deitbe @ consumer dot org wrote: Brian, Post your code? Bernie MS Excel MVP "Brian Murphy" wrote in message ... I'm using Timer to profile some code. *For no reason I can think of I'm getting overflow when trying to call Timer to get the time value. Why would this happen? If I enter debug mode and press continue, the error goes away. Thanks, Brian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Overflow error | Excel Programming | |||
run-time error '6' - overflow - once I declare a pre-used variable name as integer | Excel Programming | |||
run-time error 6 - overflow | Excel Programming | |||
Run-time error '6' overflow | Excel Programming | |||
Run-time error 6 Overflow | Excel Programming |