Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default autocalculate to include my function

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default autocalculate to include my function

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" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default autocalculate to include my function

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" wrote in message
...
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.



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
Sum Function that does not include 0 Txlonghorn76 Excel Worksheet Functions 15 October 7th 08 05:48 PM
Can I include both AND and OR in the same function? Dave Excel Worksheet Functions 7 September 24th 08 11:44 PM
how do I include advance payments in the PMT function Razzle Dazzle Excel Worksheet Functions 1 November 3rd 05 07:10 PM
Can SUMIF function include AND function ShaneS Excel Worksheet Functions 1 May 17th 05 03:24 AM
Include Saturday in the WORKDAY function kippi3000 Excel Worksheet Functions 9 December 31st 04 08:21 AM


All times are GMT +1. The time now is 04:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"