I am trying to removeconnection from my work book but I am still geting run-time error 5. I dont know what to do because in my other projects it works.
Thanks for ad
Why not using the built-in enumerator of the connections collection?
Public Sub DeleteAllConnectionsInWorkbook() Dim aConn as Object For Each aConn in ActiveWorkbook.Connections aConn.Delete Next aConn End Sub