Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Collection methods
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Collection methods
Bob Phillips spoke thus:
For Each ws in Activeworkbook For Each qyt In ws.QueryTables qyt.Delete I see. Now, if Excel's help could have told me that... I know now that collections have a Count property, but where could I have found that information, say, on MSDN or the VBA help...? Next qty Next ws -- 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. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Collection methods
Look in the object browser in Excel VBA.
-- Regards, Tom Ogilvy "Christopher Benson-Manica" wrote in message ... Bob Phillips spoke thus: For Each ws in Activeworkbook For Each qyt In ws.QueryTables qyt.Delete I see. Now, if Excel's help could have told me that... I know now that collections have a Count property, but where could I have found that information, say, on MSDN or the VBA help...? Next qty Next ws -- 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Leveling Methods | Excel Worksheet Functions | |||
Std.Dev.methods NOT WORKING | Charts and Charting in Excel | |||
Tabels and calculation methods | Excel Programming | |||
Search Methods | Excel Programming | |||
Certain methods do not work | Excel Programming |