Deleting name-objects

T

Tom

Hi

I'd like to delete all name-objects that contain the caption "Mark_XX". This
takes a very long time when more than 10'000 names of that kind are
available. Is there a faster way than doing it with a loop command?

Tom
 
C

Chip Pearson

Tom,

You have to use a loop to delete the names.

Dim Nm As Name
For Each Nm In ThisWorkbook.Names
If Nm.Name Like "Mark_??" Then
Nm.Delete
End If
Next Nm


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
T

Tom

Chip

Is this the only solution? Is it not possible to use something like this:

Activeworkbook.Remove.Names


Tom
 
C

Chip Pearson

Tom,

As far as I know, there is no way to delete all the names in a workbook
without resorting to a loop.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
T

Tom Ogilvy

You can turn transition on and use sendkeys to send the Lotus menu/keystroke
equivalent to remove all names. I don't recall the keystrokes, but this
has been posted in the group, so should be able to find it in a Google group
search.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top