ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UDFs in worksheets with external data sources (https://www.excelbanter.com/excel-programming/350866-udfs-worksheets-external-data-sources.html)

Gyruss

UDFs in worksheets with external data sources
 
Hi,

I have cells that call user defined functions in a database-linked
worksheet. Refreshing the data causes some pretty irritating behaviour.

When the old data gets deleted, the cells referencing the UDFs are
recalculated. Because there's nothing in the cells passed as arguments to
the UDFs, the UDFs return error strings. I can live with this.

However, once the new data is loaded, the same cells are NOT recalculated.
I have to force a recalculation by pressing CTRL-ALT-F9.

Is there some event that occurs at the end of a database retrieve where I
can code the worksheet to do a full recalculation?

Cheers!



John.Greenan

UDFs in worksheets with external data sources
 
have you thought about using application.calculatefull at the end of the
database retrieval code?


--
www.alignment-systems.com


"Gyruss" wrote:

Hi,

I have cells that call user defined functions in a database-linked
worksheet. Refreshing the data causes some pretty irritating behaviour.

When the old data gets deleted, the cells referencing the UDFs are
recalculated. Because there's nothing in the cells passed as arguments to
the UDFs, the UDFs return error strings. I can live with this.

However, once the new data is loaded, the same cells are NOT recalculated.
I have to force a recalculation by pressing CTRL-ALT-F9.

Is there some event that occurs at the end of a database retrieve where I
can code the worksheet to do a full recalculation?

Cheers!





All times are GMT +1. The time now is 10:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com