View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default UDF Frustration - Won't Update

Maybe you can force it to calculate:
http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

HTH,
Ryan--

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"EricG" wrote:

Okay, so I have a UDF which refers to a range on the same sheet. Something
like "=My_UDF(A3:G45)". The UDF pulls data from the range and performs some
calculations, returning a number to the cell containing the UDF.

One of the cells in the referred-to range as a RAND() function in it.
Whever I hit F9 (calculate), the value in this cell changes. However, my UDF
is not triggered. I know this because a) the value in the cell doesn't
change, and b) the break point in the UDF is never reached.

I would expect my UDF to be triggered any time that one of the values in its
range changes. I can manually type in a number to the cell with RAND() in
it, and the UDF updates. Why does it not update when due to the calculation
event?

Thanks,

Eric