Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Custom Function being called when it shouldn't.
"Tom Ogilvy" wrote in news:ekHNUzX$EHA.3924
@TK2MSFTNGP15.phx.gbl: If any values that the formula is dependent on change, then it will recalculate. Hi Tom, I'm running code in a seperate worksheet with no [that I can see] references to the function at all, yet various pieces of small and simple code are calling this function and trying to run it on the active cell. Here's the simple code that's the second piece to [unwantedly] call this function. Sub ChangeZeros() Range("a12").Select Do Until Selection.Value = "end" ActiveCell.Offset(1, 0).Select If ActiveCell.Offset(0, 3).Value = 0 Then ActiveCell.Offset(0, 3).Value = 1 End If Loop End Sub When I get to the first cell that actually has a zero to be changed to 1 it calls the function. I'm at a loss as to why. Ron |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Custom Function being called when it shouldn't.
My guess would be that one of the cells that your function depends on has
some dependency on the cell that gets changed to 1. -- Regards, Tom Ogilvy "Ron" wrote in message 10.200... "Tom Ogilvy" wrote in news:ekHNUzX$EHA.3924 @TK2MSFTNGP15.phx.gbl: If any values that the formula is dependent on change, then it will recalculate. Hi Tom, I'm running code in a seperate worksheet with no [that I can see] references to the function at all, yet various pieces of small and simple code are calling this function and trying to run it on the active cell. Here's the simple code that's the second piece to [unwantedly] call this function. Sub ChangeZeros() Range("a12").Select Do Until Selection.Value = "end" ActiveCell.Offset(1, 0).Select If ActiveCell.Offset(0, 3).Value = 0 Then ActiveCell.Offset(0, 3).Value = 1 End If Loop End Sub When I get to the first cell that actually has a zero to be changed to 1 it calls the function. I'm at a loss as to why. Ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What is this function called?? | Excel Discussion (Misc queries) | |||
Custom Function being called when it shouldn't. | Excel Programming | |||
How can I find the last time a custom function is called ? | Excel Programming | |||
Using a Custom Function - determining the row that called it | Excel Programming | |||
Possible to know who has called a function ? | Excel Programming |