Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Forcing Evaluation of Functions

I have created a function in VBA and refer to it in
various places on a worksheet - it produces correct
results when I initially hit enter on the cell. When the
data it uses changes, the cell with the function in it
does not automatically change (like it would with a
formula). If I go to the cell and hit enter in the input
area, it does correctly re-evaluation the function.

Is there a command I can run that will force it to re-
evaluate the function on the whole worksheet (without me
hitting enter on each cell).

Thanks for any suggestions,
Meryl
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Forcing Evaluation of Functions

Lok up Volatile Method in help.

I found this:
Example
This example marks the user-defined function "My_Func" as volatile. The
function will be recalculated whenever calculation occurs in any cells on
the worksheet on which this function appears.

Function My_Func()
Application.Volatile
'
' Remainder of the function
"
End Function
"meryl" wrote in message
...
I have created a function in VBA and refer to it in
various places on a worksheet - it produces correct
results when I initially hit enter on the cell. When the
data it uses changes, the cell with the function in it
does not automatically change (like it would with a
formula). If I go to the cell and hit enter in the input
area, it does correctly re-evaluation the function.

Is there a command I can run that will force it to re-
evaluate the function on the whole worksheet (without me
hitting enter on each cell).

Thanks for any suggestions,
Meryl



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Forcing Evaluation of Functions

Its better to put all the ranges that the function refers to as arguments
for the function: that way Excel can tell when to recalculate the function.
Using Volatile works, but the function will be recalculated at every single
calculation rather than only when it needs to be. This can be very slow.


Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com

"Bob Kilmer" wrote in message
...
Lok up Volatile Method in help.

I found this:
Example
This example marks the user-defined function "My_Func" as volatile. The
function will be recalculated whenever calculation occurs in any cells on
the worksheet on which this function appears.

Function My_Func()
Application.Volatile
'
' Remainder of the function
"
End Function
"meryl" wrote in message
...
I have created a function in VBA and refer to it in
various places on a worksheet - it produces correct
results when I initially hit enter on the cell. When the
data it uses changes, the cell with the function in it
does not automatically change (like it would with a
formula). If I go to the cell and hit enter in the input
area, it does correctly re-evaluation the function.

Is there a command I can run that will force it to re-
evaluate the function on the whole worksheet (without me
hitting enter on each cell).

Thanks for any suggestions,
Meryl





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Forcing Evaluation of Functions

Thank you - this did the trick - did not have to worry
about the performance.
-----Original Message-----
Lok up Volatile Method in help.

I found this:
Example
This example marks the user-defined function "My_Func"

as volatile. The
function will be recalculated whenever calculation

occurs in any cells on
the worksheet on which this function appears.

Function My_Func()
Application.Volatile
'
' Remainder of the function
"
End Function
"meryl" wrote in

message
...
I have created a function in VBA and refer to it in
various places on a worksheet - it produces correct
results when I initially hit enter on the cell. When

the
data it uses changes, the cell with the function in it
does not automatically change (like it would with a
formula). If I go to the cell and hit enter in the

input
area, it does correctly re-evaluation the function.

Is there a command I can run that will force it to re-
evaluate the function on the whole worksheet (without

me
hitting enter on each cell).

Thanks for any suggestions,
Meryl



.

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
Performance Evaluation Free Bird Katie Excel Discussion (Misc queries) 1 June 23rd 09 09:26 PM
Vlookup evaluation Mick[_2_] Excel Worksheet Functions 2 February 25th 08 02:22 PM
Evaluation Sheet perplexed Excel Worksheet Functions 2 March 10th 06 10:51 PM
dealer evaluation AB Excel Worksheet Functions 1 June 15th 05 02:17 PM
Options Evaluation Michael G. Excel Worksheet Functions 0 January 28th 05 05:41 PM


All times are GMT +1. The time now is 09:17 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"