I have created a small function in module1. The function works correctly
when entered in the worksheet but does not auto recalculate when some of the
data it uses is updated.
Can I force the recalculation to include this function?
John.
I have created a small function in module1. The function works correctly
when entered in the worksheet but does not auto recalculate when some of the
data it uses is updated.
Can I force the recalculation to include this function?
John.
Hi John,
Please post the code of the function and the formula with which you call it.
Probably the reason for not recalculating is that you access some cells
directly from within the function.
All input to a function should be via the argument list; otherwise Excel is
not aware of the need for recalculation.
A workaround is to include "Application.Volatile" in your function.
However, that may slow down recalculation of your workbook and it is not
guaranteed that it will be recalculated correctly in future versions of
Excel.
The only *correct* way is to include all input in the argument list.
--
Kind regards,
Niek Otten
"John F" <[email protected]> wrote in message
news:[email protected]...
>I have created a small function in module1. The function works correctly
> when entered in the worksheet but does not auto recalculate when some of
> the
> data it uses is updated.
>
> Can I force the recalculation to include this function?
>
> John.
Public Function myFunction()
Application.Volatile
End Function
so using applicaton.Volatile will cause it to be recalced on every
calculation. The alternative is to make the dependent cells part of the
argument list for the function. This is what excel used to determine which
cells it is dependent on.
--
Regards,
Tom Ogilvy
"John F" <[email protected]> wrote in message
news:[email protected]...
> I have created a small function in module1. The function works correctly
> when entered in the worksheet but does not auto recalculate when some of
the
> data it uses is updated.
>
> Can I force the recalculation to include this function?
>
> John.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks