Forum Discussion
MartinRavn
Sep 16, 2020Copper Contributor
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. Aft...
MartinRavn
Sep 16, 2020Copper Contributor
Thank you for your input.
I have tried setting the connection to refresh on startup, however this refresh happens after the Workbook_open()-macro has finished, and thus after the data required in the form needs to be loaded.
I have tried the "for each..." loop as well, but since .net framework (or some other function) hasn't loaded at the time of running the workbook_open(), the connections are not updated.
NikolinoDE
Sep 16, 2020Platinum Contributor
Please try it with this info, maybe this will help you.
Unfortunately, I can't help anymore, because my Latin or knowledge is at the end.
Connection properties
Nikolino
I know I don't know anything (Socrates)