Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default UDFs: A simple question.

I've noticed that UDFs won't auto-calculate, and I can't figure out why.
Even F9 and Shift+F9 will not force manual recalculation. The only way I can
get them to rerun the code in the UDF is to select the cell, click in the
formula bar as if I were going to edit the formula (or use F2), and enter
the formula again.

This leaves me with one simple question:
How do I get my UDFs to autocalculate, just as normal Excel functions do?

Thanks so much for all your help!
Mike Mertes


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default A simple question.

Hi Mike

Ctrl-Alt-F9 will do a full recalc

You can add this line to your function(on top)
Application.Volatile

But it will not make Excel faster

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mike Mertes" wrote in message ...
I've noticed that UDFs won't auto-calculate, and I can't figure out why.
Even F9 and Shift+F9 will not force manual recalculation. The only way I can
get them to rerun the code in the UDF is to select the cell, click in the
formula bar as if I were going to edit the formula (or use F2), and enter
the formula again.

This leaves me with one simple question:
How do I get my UDFs to autocalculate, just as normal Excel functions do?

Thanks so much for all your help!
Mike Mertes




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default A simple question.

Mike,

You can put

Application.Volatile

as the first line of your UDF, which will make it voltile (re-calced when
Excel calcs). Or, reference a cell in your functions parameter list to force
a dependency.

Also, Ctrl-Alt-F9 forces a complete re-calc.

HTH,
Bernie
MS Excel MVP

"Mike Mertes" wrote in message
...
I've noticed that UDFs won't auto-calculate, and I can't figure out why.
Even F9 and Shift+F9 will not force manual recalculation. The only way I

can
get them to rerun the code in the UDF is to select the cell, click in the
formula bar as if I were going to edit the formula (or use F2), and enter
the formula again.

This leaves me with one simple question:
How do I get my UDFs to autocalculate, just as normal Excel functions do?

Thanks so much for all your help!
Mike Mertes




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default UDFs: A simple question.

Do you pass all cell dependencies as arguments, so that Excel can figure
out when a recalc is needed?

Jerry

Mike Mertes wrote:

I've noticed that UDFs won't auto-calculate, and I can't figure out why.
Even F9 and Shift+F9 will not force manual recalculation. The only way I can
get them to rerun the code in the UDF is to select the cell, click in the
formula bar as if I were going to edit the formula (or use F2), and enter
the formula again.

This leaves me with one simple question:
How do I get my UDFs to autocalculate, just as normal Excel functions do?

Thanks so much for all your help!
Mike Mertes


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
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
'portable' UDFs??? whelanj[_7_] Excel Programming 1 July 9th 04 01:13 PM
Acrobat 6.0 and UDFs Mike Lee[_2_] Excel Programming 0 January 29th 04 04:07 PM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


All times are GMT +1. The time now is 03:53 PM.

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

About Us

"It's about Microsoft Excel"