remove a Macro

  • Thread starter Thread starter stew
  • Start date Start date
Hi,

1. In the VBE (Visual Basic Editor) either open the module in which the code
is located, highlight it, and press delete.
2. Or right click the module in the Project window at the top left of the
screen and choose Remove Module1 (pressing Del will not delete the module)

A few points:
a. You can't remove the Sheet or Workbook objects, for them you can use
method 1 above or you can, in the case of Sheet delete the sheet on the Excel
side, the associated code will go.
b. If the code is in a User Form you can delete it by method 1 or by using a
similar approach to #2 to remove the UserForm.
c. Leaving the Module in when deleting the some or all of the code contained
in it is not required. Of course you don't want to do it if you want to keep
some of the code.

-
 

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