Hello all!
I have a workbook with multiple connections. I would like to know if there is a way through VBA to disable all connections simultaneously instead of having to list out
ActiveWorkbook.Connections("Connection").Delete
ActiveWorkbook.Connections("Connection1").Delete
ActiveWorkbook.Connections("Connection2").Delete
ActiveWorkbook.Connections("Connection3").Delete
ActiveWorkbook.Connections("Connection4").Delete
ActiveWorkbook.Connections("Connection5").Delete
ActiveWorkbook.Connections("Connection6").Delete
ActiveWorkbook.Connections("Connection7").Delete
ActiveWorkbook.Connections("Connection8").Delete
ActiveWorkbook.Connections("Mydb").Delete
ActiveWorkbook.Connections("MyOtherdb").Delete
and so on...
I suppose I could do a Loop and increment the Connection number each time, but I would rather use a command like ActiveWorkbook.AllConnections.Delete, if there is such a thing.
Appreciatively,
I have a workbook with multiple connections. I would like to know if there is a way through VBA to disable all connections simultaneously instead of having to list out
ActiveWorkbook.Connections("Connection").Delete
ActiveWorkbook.Connections("Connection1").Delete
ActiveWorkbook.Connections("Connection2").Delete
ActiveWorkbook.Connections("Connection3").Delete
ActiveWorkbook.Connections("Connection4").Delete
ActiveWorkbook.Connections("Connection5").Delete
ActiveWorkbook.Connections("Connection6").Delete
ActiveWorkbook.Connections("Connection7").Delete
ActiveWorkbook.Connections("Connection8").Delete
ActiveWorkbook.Connections("Mydb").Delete
ActiveWorkbook.Connections("MyOtherdb").Delete
and so on...
I suppose I could do a Loop and increment the Connection number each time, but I would rather use a command like ActiveWorkbook.AllConnections.Delete, if there is such a thing.
Appreciatively,