Hello all,
I am running a file which had query and connections deleted via macro. But still when I open it the next time, it will take just as long to load the file and will display a message "Loading .Net Framework..." at the bottom right of statusbar in Excel.
What can I do to get rid of this ,
Macro to remove query and connections
Thanks and will appreciate a lot.
I am running a file which had query and connections deleted via macro. But still when I open it the next time, it will take just as long to load the file and will display a message "Loading .Net Framework..." at the bottom right of statusbar in Excel.
What can I do to get rid of this ,
Macro to remove query and connections
VBA Code:
Dim cn As WorkbookConnection
Dim qr As WorkbookQuery
On Error Resume Next
For Each cn In ThisWorkbook.Connections
cn.Delete
Next
For Each qr In ThisWorkbook.Queries
qr.Delete
Next
Thanks and will appreciate a lot.