Search notes:

Excel Object Model: workbook.connections

Iterate over connections

option explicit

sub iterateOverWorkbookConnections() ' {

    dim con as workbookConnection

    for each con in activeWorkbook.connections

        dim tp_ as long
        dim tp  as string

        tp_ = con.type

        if      tp_ = xlConnectionTypeOLEDB   then tp = "OLEDB"    _
        else if tp_ = xlConnectionTypeXMLMAP  then tp = "XML Map"  _
        else                                       tp = "?"

        debug.print con.name & ", type = " & tp & ", description = " & con.description

        dim rng as range
        for each rng in con.ranges
            debug.print "  " & rng.parent.name & ": " & rng.address
        next rng

        debug.print

        if     tp_ = xlConnectionTypeOLEDB then

           with con.oledbConnection
           debug.print "  connection  = " & .connection
           debug.print "  commandText = " & .commandText
           end with

        elseif tp_ = xlConnectionTypeXMLMAP then

        ' Nothing to see here?

        end if
        debug.print

    next con

end sub ' }
Github repository about-MS-Office-object-model, path: /Excel/Workbook/connections/iterate.vb

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1743262011, '3.139.104.122', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/Office/Excel/Object-Model/Workbook/connections/index(78): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78