Share via

MACRO WARNING IN EXCEL 2003

Anonymous
2011-09-17T16:03:38+00:00

I TRIED TO CREATE A MACRO  BUT IT DIDN'T WORK, NOW WHENEVER I LOAD THE FILE I GET A MACRO WARNING ASKING

WHETHER IWANT TO ENABLE OR DISABLE THE MACRO.HOW CAN I DELETE THIS?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2011-09-18T10:45:57+00:00

I assume that you just want to get rid of the warning for this one workbook?  If so, then this should do it:

Open the workbook.  You can choose to [Enable] or [Disable] macros, it won't matter later.

Press [Alt]+[F11] to enter the VB Editor.

If you do not see an are labeled as [Project - VBAProject] then press [Ctrl]+[R] to bring it into view.

In the VBAProject window you will see the objects associated with your workbook, one of those is going to be Modules, clidk that entry to expand it to show the individual code modules in the workbook.  There may just be one, or there could be several if you have recorded several macros during different sessions with the workbook.

Right-Click each individual code module name in the list one at a time and then choose the "Remove ..." option (which will include the module's name as part of the entry).  When it asks if you wish to export the module before deleting it, choose NO.  The code module will be removed.

Once you have removed all code modules from the workbook, it should open without the Macro warning.  Give it a test by saving the workbook with the changes you've just made and then close it and reopen it.  If it opens without the Macro warning, you're done...

However, it is possible that you may have recorded macros in such a way that there is some VBA code (a macro) associated with the individual worksheets in the workbook, or even the ThisWorkbook object. To check to see if that is the case, just double-click each worksheet name in the list in the Project window - if a sheet has any code associated with it, it will appear in the main window, simply select all of the code and delete it and move on to the next sheet.  Do the same for the ThisWorkbook object.

Once again, save the workbook with changes, close it and reopen to make sure you got rid of everything.  If there are any UserForms in the workbook, they would also need to be removed/deleted from it.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful