Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
In VBA, when I define a user function and use it in the spreadsheet, it does not seem to update. You have to manually go into the cell and re-input the function name to get it to update when data has changed. Can you let it auto-update as if it was a built-in Excel function? Thanks, Roel |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Roel wrote:
Hi, In VBA, when I define a user function and use it in the spreadsheet, it does not seem to update. You have to manually go into the cell and re-input the function name to get it to update when data has changed. Can you let it auto-update as if it was a built-in Excel function? Add "Application.Volatile = True" in the code for your UDF. Regards, -- Beto Reply: Erase between the dot (inclusive) and the @. Responder: Borra la frase obvia y el punto previo. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Roel,
Probably you did not include all the arguments in the argument list of the function definition. If you access cells directly from within a function, not via the argument list, Excel does not know, so it doesn't know when to recalculate. Including "Application.Volatile" may seem to help, but there are no guarantees that cells will be recalculated in the correct order. Even if they seem to do so, that is no guarantee for future releases of Excel. The only correct way is to include all input to the function in the argument list. -- Kind Regards, Niek Otten Microsoft MVP - Excel "Roel" wrote in message ... Hi, In VBA, when I define a user function and use it in the spreadsheet, it does not seem to update. You have to manually go into the cell and re-input the function name to get it to update when data has changed. Can you let it auto-update as if it was a built-in Excel function? Thanks, Roel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom functions | Excel Discussion (Misc queries) | |||
Custom Functions | Excel Worksheet Functions | |||
Custom Functions | Excel Discussion (Misc queries) | |||
Using custom functions within custom validation | Excel Discussion (Misc queries) | |||
Custom Functions | Excel Worksheet Functions |