Excel macro warning message

  Nosmas 21:47 10 Oct 05
Locked

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 05

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 05

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 05

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,

Regards,

Simsy

  VoG II 13:48 11 Oct 05

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 05

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.

What is Amazon Go and will it come to the UK? The store without checkouts or queues

1995-2015: How technology has changed the world in 20 years

Why ecommerce hasn't taken off on social media

New MacBook Pro 2016 review | MacBook Pro with Touch Bar review: Apple's expensive and powerful…