PDA

View Full Version : Can't delete macro in Excel



asdex
20-11-2009, 02:47 PM
Hi I have made a spread sheet with about 10 worksheets. I tried a macro to see in I could install a button to save and exit the spreadsheet but it didn't work. I deleted the macro in the Macro window but everytime I open the spreadsheet the security message appears that the macros have been disabled.
How can I remove the micro completely?
Thanks,
asdex

the_bogan
20-11-2009, 06:06 PM
Where is the macro stored? In the workbook? Or your Personal?

andrew93
21-11-2009, 11:22 AM
It sounds like you may have deleted the macro but left behind a module. Open the spreadsheet, press the keys Alt & F11 together to open the Visual Basic Editor window. On the left hand side under the heading 'Project - VBA Project' you should see a heading called 'VBAProject (zzzzz.xls)' where zzzzz is the name of your spreadsheet. Under that heading should be a folder call 'Modules', and under that is 'Module1'. Right click 'Module1' and remove it (don't export it first). Repeat for other unused modules (if any). Save, close and re-open your spreadsheet.

Andrew

asdex
23-11-2009, 11:06 AM
Thanks for your answer. Did what you suggested but found this answer and once that was was done as well it's all clear.
Cheers,

"Reopen the file and the Macro warning should be gone. If not open the VB Editor and double click on every worksheet icon and delete any code present and filesave and reopen."

andrew93
23-11-2009, 10:15 PM
Ah - I presumed you had already deleted the macros per your first post.....that mustn't have been the case. At least you found a solution!

A