I have several OLEDB connections in my worksheet which I'm trying to refresh via VBA.
Dim Sh As Worksheet Dim WhatTable As String Dim SQLTable As OLEDBConnection Set Sh = ThisWorkbook.Sheets("Leads Last 24 Months") Sh.ListObjects(1).QueryTable.Refresh BackgroundQuery:=False ProgressBar.Caption = "Progress - " & "Refreshing Leads Table" DoEvents Set Sh = ThisWorkbook.Sheets("Events&Tasks Last 12 Months") Sh.ListObjects(1).QueryTable.Refresh BackgroundQuery:=False
My code is as abovefor one table. The problem is I get an error that says something along the lines of "Unexpected Error", "Exception from HResult: 0x800A03EC"
I'm not sure what this means.
I then get an option to send a "Frown"
Is there something I'm missing in my code above?