Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Custom Function being called when it shouldn't.

Sorry chaps,

In both instances of the below the equals should be < as I had changed it
to equals to debug.

This gist of it is, if the active sheet isn't the sheet with the function
in then it exits the function.



If ActiveSheet.Name = "Standard Dev" Then
Exit Function
End If





Ron
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Custom Function being called when it shouldn't.

set rng = Application.Caller
if rng.Parent.Name < Activesheet.Name then exit Function

However, this doesn't stop your function from being reevaluated, even if
only partially, - and would return a value of zero. Better would be to find
out why it is being recalculated when you think it shouldn't.

--
Regards,
Tom Ogilvy

"Ron" wrote in message
10.200...
Sorry chaps,

In both instances of the below the equals should be < as I had changed it
to equals to debug.

This gist of it is, if the active sheet isn't the sheet with the function
in then it exits the function.



If ActiveSheet.Name = "Standard Dev" Then
Exit Function
End If





Ron



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
What is this function called?? jPaulB Excel Discussion (Misc queries) 3 August 4th 06 08:33 PM
How can I find the last time a custom function is called ? James Shoffit Excel Programming 1 December 6th 04 05:52 PM
XLA function called twice Nigel[_9_] Excel Programming 0 November 16th 04 10:46 AM
Using a Custom Function - determining the row that called it Masa Ito Excel Programming 3 October 1st 04 02:49 AM
Possible to know who has called a function ? Isabelle Robin Excel Programming 3 March 5th 04 12:33 AM


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