Suppress the message "Getting Data..." when importing from ODBC..?

403 Views Asked by At

In Excel 2007, when importing data via SQL/ODBC, it displays the message "Getting data" in the top-left cell of the import range. This occurs whether the query is run from the GUI or from VBA.

Can this message be suppressed..??? There seem to be no settings for it, either in the GUI or the VBA object properties of the WorkbookConnection, ODBCConnection, ListObject, or QueryTable.

I would like to create a customized "please wait" message with an animation, but the "Getting Data" message creates a visual conflict.

I tried the following, but it didn't suppress the message:

xl.ScreenUpdating = False
xl.DisplayAlerts = False

ExternalData_1: Getting Data...

enter image description here

1

There are 1 best solutions below

1
SnowFallsUp On

Try disabling BackgroundQuery parameter:

With Selection.QueryTable
   .BackgroundQuery = False
End With