Radoslaw Poprawski
Active Member
- Joined
- Jun 19, 2021
- Messages
- 398
- Office Version
- 365
- Platform
- Windows
Hello,
Based on this thread:
and when I go step by step (f8) it works.
however when i save and close, then re-open i can clearly see the pane is openning but b4 its fullly visable it vanishes again and i do not l know why?
My second question how would I implement this code into personal.xlsb file so that with each excel file being open this code would run?
Based on this thread:
Queries and Connections Pane via VBA?
from this forum i came up with this code:
VBA Code:
Private Sub Workbook_Open()
BU_Matrix.Range("G2") = Year(Now()) & "_" & Right("0" & Month(Now()), 2) & "A"
ActiveWorkbook.Connections("Query - MyQuery").Refresh
Application.CommandBars("Queries and Connections").Visible = True
Application.CommandBars("Queries and Connections").Position = msoBarRight
Application.CommandBars("Queries and Connections").Width = 350
End Sub
and when I go step by step (f8) it works.
however when i save and close, then re-open i can clearly see the pane is openning but b4 its fullly visable it vanishes again and i do not l know why?
My second question how would I implement this code into personal.xlsb file so that with each excel file being open this code would run?