"Reference not Valid" error in the macro dialog box

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
Back
Top