View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Collection methods

N ever used QueryTables, but to clear from a collection you would normally
use

For Each ws in Activeworkbook
For Each qyt In ws.QueryTables
qyt.Delete
Next qty
Next ws

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Christopher Benson-Manica" wrote in message
...
How do I delete all the elements in a collection? (Specifically, the
QueryTables collection, but I don't know if that matters).

You'd think this would be trivial, but Excel's VBA help is a horrific
unmitigated disaster.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.