View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Collection methods

Dim qt as QueryTable
for each qt in Activesheet.QueryTables
qt.Delete
Next

--
Regards,
Tom Ogilvy

"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.