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

Meme,

There was a typo in the code I gave you. Give this a try instead

For Each nme In ActiveWorkbook.Names
If Left(nme.Name, 8) = "external" Then
nme.Delete
End If
Next nme

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
Thanks Bob for your response. However the name
like "external..." didn't get moved from the name lists
by the code, should I make some adjustments before copy-
paste your code to my macro ?
Thanks a lots.
Meme
-----Original Message-----
Run some code

Dim nme As Name

For Each nme In ActiveWoekbook.Names
If Left(nme.Name,8) = "external" Then
nme.Delete
End If
Next nme

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Meme" wrote in

message
...
Hi ,

I created a macro to download data from .prn files to

my
worksheet A , then query the data and copy-past the
results to worksheet B. Every time after running my

macro
it created hundreds of names with the pattern like :
externaldata-34
externaldata-35
.....
and all the way to externaldata-569!!!!!! I am so
frustrated with all this names. Any one can give me

some
suggestions on how to get rid of this ????????
Please help ! Thanks so much!

Meme



.