Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Delete names

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Delete names

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Delete names

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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
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



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete names on worksheet? GOH Excel Discussion (Misc queries) 9 May 22nd 08 03:38 PM
Delete defined names beata Excel Discussion (Misc queries) 1 January 7th 08 09:44 PM
Delete names from a list ClemCadidlhoper Excel Discussion (Misc queries) 15 January 5th 06 10:50 PM
Delete names in workbook U. Kõrsmaa Excel Programming 6 February 8th 04 08:37 PM
DELETE NAMES gus Excel Programming 5 September 22nd 03 06:35 PM


All times are GMT +1. The time now is 07:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"