Web Queries

P

Pelham

I have a spreadsheet with about 450 different Web Queries in it which
have been created with a VBA Macro. Does anyone know how to remove all
the Web Queries in one hit once the Macro has stopped running?

I have tried CTRL-A and then right clicking to remove the Web Query but
it does not seem to remove all of them...
 
D

Don Guillett

You may want to have exclusions or if left(name to NOT remove some names.

Sub DeleteAllNames()
For Each Name In Names
Name.Delete
Next Name
End Sub
 
P

Pelham

Thanks Don!

But, how exactly does this VBA script remove all my embedded Web
Queries because I cannot see how this script can find the 450 odd Web
Queries in my worksheet without a reference to the Web Queries
themselves...?
 
Top