I've run into a curious problem.
Using Data-New Query - From Oracle Database, I've created an ODBC connection to oracle (with a SQL statement).
What I'd like to do is use VBA to force a refresh.
My current method is using SSIS to execute a "Macro"/subroutine which works until it gets an error.
The curious part is, if I manually use Data - Show Queries (and then close it), this code sample works.
When I do not manually (mouse and clicking) do this first, it fails.
Sheets("Data").Range("D8").Select
ActiveWorkbook.RefreshAll
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Using this below also fails until after the first time I've manually opened/closed the panel.
Application.CommandBars("Workbook Queries").Visible = True
Application.CommandBars("Workbook Queries").Visible = False
I'm sort of hoping there's something obvious and quick I'm just missing.
Mike
Using Data-New Query - From Oracle Database, I've created an ODBC connection to oracle (with a SQL statement).
What I'd like to do is use VBA to force a refresh.
My current method is using SSIS to execute a "Macro"/subroutine which works until it gets an error.
The curious part is, if I manually use Data - Show Queries (and then close it), this code sample works.
When I do not manually (mouse and clicking) do this first, it fails.
Sheets("Data").Range("D8").Select
ActiveWorkbook.RefreshAll
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Using this below also fails until after the first time I've manually opened/closed the panel.
Application.CommandBars("Workbook Queries").Visible = True
Application.CommandBars("Workbook Queries").Visible = False
I'm sort of hoping there's something obvious and quick I'm just missing.
Mike
Last edited: