Hi,

I need a macro to refresh all workbook connections and then save and close the file. The connection information is present in .odc files. My problem is that the macro moves to the next step before the refresh is complete. I noticed that by default the 'Enable background refresh' checkbox is checked and disabled. Before starting the refresh, I could see through Watches that the OLEDBConnection's 'Refreshing' and 'BackgroundQuery' shows 'Application-defined or object-defined error'. Can you please let me know how i could complete the refresh before moving on to the next step?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.