New to VBA - Help with Deleting Macro's

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

Guest

I have a macro in a workbook that does several things, the last thing is to
save the file under a new name. The reason is that I want to send the saved
file to a customer, but I don't want the macro attached. After the file has
been saved, if I go in and delete the macro, I still get the "Enable",
"Disable" macro pop-up screen when I open the file. Why is this still
showing up after I have deleted the macro, and how can I get rid of it so
that my customers don't see it.
Any help would be appreciated. Thanks
 
Ron,
Thanks for all your help. Your add-in looks pretty slick.

Thanks again.
 
Dear Ron
I have been using following code which "modifies itself".

ThisWorkbook.VBProject.VBComponents("Module2").CodeModule.DeleteLines
1,
ThisWorkbook.VBProject.VBComponents("Module2").CodeModule.CountOfLines
ThisWorkbook.VBProject.VBComponents("Module2").CodeModule.InsertLines
1, CodeM

Where CodeM is a any string containing a text of any macro. If You want
to delete it - CodeM is a "".

Greetings

Martin
 

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