Excel macro warning message

  Nosmas 21:47 10 Oct 2005

My system is WXP SP2 and Office 2000 Professional. Recently I added a macro to an Excel workbook and when I opened the file I got the usual warning message about macros possibly containing a virus and giving the options to Disable or Enable the macros.

Having decided that I did not need the macro I deleted it and closed the workbook. Although the workbook no longer contains any macros I still get the warning message every time I open the file. What else do I need to do to prevent the warning message being displayed?

  VoG II 21:51 10 Oct 2005

You need to remove the macro. Open the file and accept the macro, ALT+F11 to open the Visual Basic Editor. File|Remove and follow the prompts.

  Nosmas 23:04 10 Oct 2005

Thanks for your very prompt reply. Have tried your suggestion but the 'Remove' option is greyed out for ALL sheets in the workbook. Also when I select Tools > Macro > Macros (which I did originally to delete the macro) the dialog box displayed has only the Cancel button 'active' - all the others are greyed out - which I assume confirms there are no macros in the workbook.

  Simsy 08:44 11 Oct 2005

just deleted the code for the macro, without removing the module itself...

You will get the warning if the workbook contains a module... even if the module contains nothing.

To remove the module, right click on it in the Project explorer window, (in the VBA editor), and select "Remove module."

Another possibility is that you have somehow saved the macro in your "personal.xls", which is like a template.

God luck,



  VoG II 13:48 11 Oct 2005

Or there may be some code associated with one or more sheets. Right click each tab in turn and select View Code.

  Nosmas 23:40 11 Oct 2005

Sorry for the delay in getting back to this forum. Your suggestion to remove the module has worked, so thank you very much. I am puzzled though that the Excel Help on the topic of 'Delete a macro' makes no mention of modules at all - it just lists the steps to delete (which is what I did when I deleted the macro), and adds at the foot: - 'Note To remove all macros from the workbook, delete each macro listed in the dialog box, and then save the workbook.'

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5T review

How to draw a mandala

iPhone X review

Musique en streaming : Spotify vs Deezer