Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / November 2006

Tip: Looking for answers? Try searching our database.

Automatic evaluation of custom worksheet function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 06 Nov 2006 20:22 GMT
Hi,

I've created a short custom function that returns TRUE or FALSE if one or
more cells within the specified range is colored red.  The function works
correctly, but if the interior color of one of the specified cells ever
changes, the function doesn't dynamically re-evaluate itself... I have to
manually force the formula cell to evaluate the function by double clicking
and hitting enter.

Any ideas?

Thanks.
Biff - 06 Nov 2006 22:23 GMT
That's why you shouldn't base calculations on formats! Changing a format
doesn't trigger a calculation. I'm not real knowledgable about VBA but you
can insert a line of code at the beginning of your UDF that makes it
volatile:

Application.Volatile

This STILL will not cause it to recalculate when the format is changed but
it will recalculate ANY time a sheet calculation takes place.

I don't know why the experts don't discourage calculations based on
color/format.

Biff

> Hi,
>
[quoted text clipped - 9 lines]
>
> Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.