View Single Post
  #31  
Old 22nd May 2014, 08:40 AM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,403
Default

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
_______________________________________________
Reply With Quote