Having difficulty with Application.CommandBars("Queries and Connections").Visible = True

johnny51981

Active Member
Joined
Jun 8, 2015
Messages
366
I have added in the following VBA into a number of my reports, in an effort to keep an eye on the updates so there are no errors:
VBA Code:
Sub OpenQueriesPane()

Application.CommandBars("Queries and Connections").Visible = True
Application.CommandBars("Queries and Connections").Width = 700 'Change width as suits.

End Sub

I then have a main Sub ReportUpdate() that gets assigned to a button, this Sub is calling all of the processes that I need associated to the whole report update, and the Sub OpenQueriesPane() is always the first call in that whole report update. Here is an example of that:
VBA Code:
Sub ReportUpdate()

    Call OpenQueriesPane
    Call RefreshData
    Call CloseExcel
    
End Sub

Problem is....it NEVER happens until all calls have been completed, if at all. Do I have anything incorrect, missing, or is this just a quirk that Excel has and I should stop trying to make it a thing?

This is on machine with 365.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,215,064
Messages
6,122,939
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top