' Checkmark the following References in Visual Basic IDE > Tools > References... ' Visual Basic for Applications, Microsoft Excel 16.0 Object Library, OLE Automation, Microsoft Office 16.0 Object Library, ' Microsoft Forms 2.0 Object Library, Microsoft Scripting Runtime ' Find all "Code Location" directions in each .txt file: ' Code Location: On code page of Worksheet "DataSources" containing tblConnectionConfig and Connection Management buttons. '------------------------------------------------------------------------------- Option Explicit Private fsFileSystem As New FileSystemObject Private Sub CommandButton1_Click() ' Build/Update connections to DATA sources Module1.updateConnections whichButton:="RebuildRefreshPivotSourceWebQuery" End Sub Private Sub CommandButton2_Click() ' Build/Update connections to DATE sources Module1.updateConnections whichButton:="RebuildRefreshMPPImportMPPQuery" End Sub Private Sub RefreshLinkedServer_Click() ' Refresh connections to DATA sources Module1.updateConnections whichButton:="RefreshPivotSourceWebQuery" End Sub Private Sub RefreshMPP_Click() ' Refresh connections to DATE sources Module1.updateConnections whichButton:="RefreshMPPImportMPPQuery" End Sub Private Sub runQuerySequence_Click() Module1.runDirective End Sub ' Find all "Code Location" directions in each .txt file: ' On code page of each Worksheet containing Structured Table(s) to be made visible to SQL Server or MS Access '------------------------------------------------------------------------------- Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) Module1.TableUpdate Target:=Target End Sub ' Find all "Code Location" directions in each .txt file: ' In code page for Workbook Excel Objects "ThisWorkbook" '------------------------------------------------------------------------------- Option Explicit Private Sub Workbook_Open() Set Module1.myWorkbook = ActiveWorkbook End Sub