quick names removal before sheet move

J

Jose Mourinho

I regularly copy a particular sheet over to another workbook, but have to
click away a multitude of Names in that sheet when prompted by Excel (i.e.
whether to copy the names over to the new workbook or not). Is not my sheet,
so cannot have the Names permanantly removed unfortunately. Is a tedious
process...I would love to have a 'Ignore all' button (maybe one day eh?).

Anyone know a quick way to avoid all this clicking?

JM
 
G

Gary''s Student

Try this little macro:

Sub NameDropper()
n = ActiveWorkbook.Names.Count
For i = n To 1 Step -1
ActiveWorkbook.Names(i).Delete
Next
End Sub
 
D

Don Guillett

If you guessed correctly that OP wants to remove "names" then this will also
work

for each n in activeworkbook.names
n.delete
next n
 

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