"Reference not Valid" error in the macro dialog box

G

Guest

I'm running Excel 2003, and I am trying to clean up some old macros from a
file I inherited.

There are tens/hundreds of old, obsolete macros when I open the macro dialog
box, and whenever I try to edit one of them I get a "Reference not Valid"
error.

I am assuming the source code for the macros went missing or in any case
excel VBA cannot locate it. Is there any way to get rid of them? I would
like to clean up the macros.

Thanks in advance.
 
J

Jan Karel Pieterse

Hi Hugehead,
I am assuming the source code for the macros went missing or in any case
excel VBA cannot locate it. Is there any way to get rid of them? I would
like to clean up the macros.

Press Alt-F11 to open the Visual Basic Editor and remove all modules from the
project (rightclick them and select remove, click no if you don't want them
exported to a text file). That should rid them. Alternatively, select all
worksheets (click first, shift-click last) and copy them to a new workbook
(rightclick a tab, choose move or copy).

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com
 

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