remove a Macro

S

ShaneDevenshire

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.

-
 
Top