Forum Discussion

MartinRavn's avatar
MartinRavn
Copper Contributor
Sep 16, 2020

Refresh data connections in workbook_open() event

Hi

 

I have created a small macro which needs to refresh a SQL Power Query before displaying an input form. 

 

When i open the workbook though, the form displays but without the updated data. After closing the form, the data updates correctly (currentlyd, the connection is set to refresh on open, but the macro also includes refresh-codes) 

 

The issue seems to be, that .NET framework doesn't load until after the workbook_open() event (and associated macros) have completed. Is there any way to mitigte this?

3 Replies

Resources