List all Computer Connection from Excel VBA
<p>I would like to know if there is a way to list the <strong>Computer Connections</strong> from Excel using VBA?</p>

<p>I was able to get all the <strong>Workbook Connections</strong> using this simple block of code:</p>

<pre><code>Private Sub ListWorkBookConnections()
    Dim cnn As WorkbookConnection
    For Each cnn In ActiveWorkbook.Connections
        Debug.Print cnn.Name
    Next cnn
End Sub
</code></pre>

<p>Those are the connections that are specific to the Active workbook (the one currently opened) and that appear in the "<em>Connections in this Workbook</em>" section if you open the "<em>Existing Connection</em>" window of Excel (Data >> Existing Connection). See the Red sections in the Picture below :</p>

<p><a href="https://i.stack.imgur.com/JD9Zg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JD9Zg.png" alt="Existing Connections Pop Up"></a></p>

<p>What I would like to achieve is listing all the connection under the section "<em>Connection Files on this Computer</em>", in Blue on the image above.</p>

<p>I am using Excel 2007 on a Windows 7 computer.</p>

<p>Thanks for your help!</p>