Macro alert on start up.

D

David Thomas

Hi, I once created a macro in a spreadsheet that I use often and now
whenever I open it, it says that the spreadsheet contains macros and I
should be aware that they are a security risk and do I want them enabled.
Assuming that I never want to use this macro again please can you tell me
how I can stop this alert appearing on start up.
regards,
David.
 
N

Nick Hodge

David

Open the VBE (Alt+F11) and in the project explorer, (top left by default),
find the workbook in question. Under this will be the ThisWorkbook object,
the worksheet objects and any other objects, including the module(s)
containing the macro(s).

Right click on the module and select 'Remove module xxxx'. A dialogue will
appear asking if you wish to export it, answer no. Repeat this for any
other modules. (If you have code behind the other objects, this too will
need to be deleted, however, if this was a recorded macro, there won't be).

Close the VBE and save the workbook. Close, re-open and all should be well.
 

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