Forum Discussion
Jean Robert
Jul 13, 2018Copper Contributor
VBA Refresh Connections : Error 1004 Application-defined or object-defined error
I have a report using Power Query and Power Pivot, that is refreshed using VBA. It worked well for several years ,and since last week the VBA stops in Debug mode on the Refresh method of the connecti...
JKPieterse
Jul 13, 2018Silver Contributor
Are there multiple refreshes in the code? I see you have not set it to refresh synchonously, so a connection might be requested to refresh while a previous one has not yet finished.
ActiveWorkbook.Connections("MYCALL21").Refresh False
Jean Robert
Jul 17, 2018Copper Contributor
So first i believe the root cause was actually different, and the issue i reported here is just a secondary effect.
Essentialy, the problem seemed to come from Micro Trends anti virus who was conflicting with my report. I already read similar cases. I asked my IT to "fix" that and now it seems none of the error messages show up anymore, neither those mentionning a vertipaq.xml file in Temp, nor the VBA refresh issues.
- JKPieterseJul 17, 2018Silver ContributorHi Jean,
Glad you got this sorted!