Prev Previous Post   Next Post Next
  #1   Report Post  
sunshine
 
Posts: n/a
Default delete name

I have about 3000+ define name in my workbook. It was not created in this
workbook. But somehow they are just there. The workbook does link to many
files. Now I want to clear them all out. I have used the following VB codes
posted in this website to delete all these define names.

Sub DeleteAllNames()
Dim objName As Excel.Name
For Each objName In ActiveWorkbook.Names
objName.Delete
Next objName
End Sub

However, it gives me the "Run-time error '1004': that name is not valid.

Can anyone please help me how to do this? Thanks a lot.
 
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
Macro to delete data in 'green' cells only Steve Excel Worksheet Functions 7 March 19th 05 01:40 PM
Cannot delete a macro Jeff B Excel Discussion (Misc queries) 3 February 15th 05 12:43 AM
How to delete macros Jaime Stuardo Excel Discussion (Misc queries) 2 February 14th 05 02:29 PM
delete row contains specific word in an macro Jean-Francois Excel Discussion (Misc queries) 4 January 11th 05 11:40 PM
Saving to a network share without delete permssions SteveHoot Excel Discussion (Misc queries) 1 January 5th 05 09:50 PM


All times are GMT +1. The time now is 08:49 PM.

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"