ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   remove a Macro (https://www.excelbanter.com/excel-discussion-misc-queries/209511-remove-macro.html)

SteW

remove a Macro
 
Hi

How do you remove a macro?

Stewart

Gord Dibben

remove a Macro
 
Simply delete it but don't forget to also delete the module in which it
resides.

See Debra's site for more info on removing macros.

http://www.contextures.on.ca/xlfaqMac.html#NoMacros


Gord Dibben MS Excel MVP

On Fri, 7 Nov 2008 17:01:01 -0800, stew
wrote:

Hi

How do you remove a macro?

Stewart



ShaneDevenshire

remove a Macro
 
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.

-
--
Thanks,
Shane Devenshire


"stew" wrote:

Hi

How do you remove a macro?

Stewart



All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com