Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculate Custom Function
I created a custom function in VBA but when I use it in a cell it doesn't
recalculate unless I edit the cell. I have Excel set for automatic calcualtion. It doesn't recalculate when I press F9. What am I doing wrong? Thanks -- Brad |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculate Custom Function
Hi Brad,
If you want to force recalcualtion of function every time Excel calculates, add the following line just after the custom function name: Public Function blabla(...) application.volatile '<<<<<< to be added HTH @+ FxM Brad L. a écrit : I created a custom function in VBA but when I use it in a cell it doesn't recalculate unless I edit the cell. I have Excel set for automatic calcualtion. It doesn't recalculate when I press F9. What am I doing wrong? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculate Custom Function
Hi
you may add the cell references in your custom function as parameter. Another option would be to add application.volatile at the beginning of your code. You may post your user defined function (IMHO the first option is the better one) -- Regards Frank Kabel Frankfurt, Germany Brad L. wrote: I created a custom function in VBA but when I use it in a cell it doesn't recalculate unless I edit the cell. I have Excel set for automatic calcualtion. It doesn't recalculate when I press F9. What am I doing wrong? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculate Custom Function
Thanks, that did the trick.
-- Brad "FxM" wrote in message ... Hi Brad, If you want to force recalcualtion of function every time Excel calculates, add the following line just after the custom function name: Public Function blabla(...) application.volatile '<<<<<< to be added HTH @+ FxM Brad L. a écrit : I created a custom function in VBA but when I use it in a cell it doesn't recalculate unless I edit the cell. I have Excel set for automatic calcualtion. It doesn't recalculate when I press F9. What am I doing wrong? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Ned Help W/ Custom Function | Excel Worksheet Functions | |||
Refresh/Recalculate a Custom Function | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
function does not recalculate sum | Excel Worksheet Functions | |||
Adding a custom function to the default excel function list | Excel Programming |