
22nd May 2014, 08:40 AM
|
|
Member
|
|
Join Date: Jan 1970
Location: Western Australia
Posts: 3,403
|
|
Puntz, i use a similar code but don't bother with the loop or count.
If ThisWorkbook.Connections.Count > 0 Then ThisWorkbook.Connections.Item(ThisWorkbook.Connect ions.Count).Delete
I also delete the queries right after i have imported data.
ActiveSheet.QueryTables.Item(1).Delete
__________________
One Drive
"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out." --moeee
_______________________________________________
|