View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ward376 ward376 is offline
external usenet poster
 
Posts: 360
Default Run-time error "5" after range().delete runs before querytable.add

I'm not positive, because your adding the query table connection with
code, but query tables are associated with automatically created named
ranges and when they're deleted, the query is also.
It may also have to do with your variable rng but I don't know how your
setting it.

Ward376