![]() |
|
|
#1 |
|
|
Problem with UDF Function
Hi guys
I got a UDF Function which counts the colored cells It works fine But when I try to color a cell within the range, Excel doesn't recalculate the colored cells until I clicked twice in the cell that has the function I want a solution to get the result as soon as I color another cell within the range.. Code:
|
|
Local Time: 10:08 PM
Local Date: 09-08-2010 |
|
|
|
#2 |
|
Distinguished Lord of VBAX
|
Not a hope dear boy. Colouring a cell does not trigger the Excel calculation, so your UDF does not fire.
You could add Application.Volatile which will cause your UDF to fire whenever any change that causes a sheet recalculation happens, but thgis will stilnot happen if a cell colour is changed. Nihil simul inventum est et perfectum Abusus non tollit usum Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen! James Thurber |
|
Local Time: 04:08 AM
Local Date: 09-09-2010 Location:
|
|
|
|
#3 |
|
|
Changing colors is not recognized as a change, such as a change in value, nor will it cause a re-calculation of the sheet.
You could try using the selection change event to force a calc. VBA:
VBA tags courtesy of www.thecodenet.com
Mark |
|
Local Time: 08:08 PM
Local Date: 09-08-2010 Location:
|
|
|
|
#4 |
|
|
Here's a sharper example of what I was thinking might be a semi-okay workaround.
http://www.cpearson.com/excel/Colors.aspx About 3/8'ths down the page. I am not saying I'd want this in anything but a small (calcualtion-wise) wb. Hope that helps, Mark |
|
Local Time: 08:08 PM
Local Date: 09-08-2010 Location:
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Free Animated Greetings | Breast Enlargement | Debt Help | Breast Enlargement | Debt Help