Can't remove a macro!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've copied some Excel documents then deleted the macro, that was in use in the original document. When I open the new document it gives the usual message, about macros being dangerous, but there's macro there. How can I get rid of this please

Thanks in advance for any help.
 
You need to delete any empty modules that housed those macros.

Hit ALT+F11 and this will open the VBE (Visual Basic Editor)
Top left you will hopefully see an explorer style pane. Within this pane you
need to search for
your workbook's name, and when you find it you may need to click on the + to
expand it. Within
that you should see the following:-

VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
ThisWorkbook
Modules
Module1
Module2
etc etc (You may have just 1 of these)

If you have named your sheets then those names will appear in the brackets above
as opposed to
what you see at the moment in my note.

Right click on the modules and select remove. When prompted with a question re
exporting, just
hit no. Then hit File / Close and return to Microsoft Excel and save the file.


--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



plp said:
I've copied some Excel documents then deleted the macro, that was in use in
the original document. When I open the new document it gives the usual message,
about macros being dangerous, but there's macro there. How can I get rid of this
please?
 
OK, have you tried looking in the Sheet objects and the ThisWorkbook Module to
see if anything is in there?
 
Definitely no modules or folders so I don't understand your encouragement to follow your previous response, sorry

Sys Spec - Win Me / Office 2000 Pr

Thanks
 
Do you want to shoot me down a copy of the file and I'll happily take a look?
Would need to take the NOSPAM bit out of my email address.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



plp said:
Definitely no modules or folders so I don't understand your encouragement to
follow your previous response, sorry.
 
By all means clear the data first if it is sensitive, as it shouldn't make a
difference - Do this on a *COPY* of the workbook though :-)
 
Thanks for the trouble you've gone to, but I tried the solution Debra gave first, 'cos there's 15 pages of data & lots of it on each sheet.
 
plp

What did you find on Debra'a site that "worked a treat"?

Seems Ken covered all that Debra has other than deleting Forms.

Need this info for future reference, please.

Gord Dibben Excel MVP
 

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

Back
Top