Hello everyone,
I'm using the following code to refresh all my ODBC connections.
Recently I added a table of an Excel File as a new Connection. But now the code doesn't work anymore due to the Backgroundquery line of code.
How can I fix this problem?
Kind regards,
Justin
I'm using the following code to refresh all my ODBC connections.
VBA Code:
For Each cn In ActiveWorkbook.Connections
cn.ODBCConnection.BackgroundQuery = False
cn.Refresh
Next
Recently I added a table of an Excel File as a new Connection. But now the code doesn't work anymore due to the Backgroundquery line of code.
How can I fix this problem?
Kind regards,
Justin