ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro code to remove a macro after it executes (https://www.excelbanter.com/excel-programming/356702-macro-code-remove-macro-after-executes.html)

charles

Macro code to remove a macro after it executes
 
After I run a macro to format an Excel worksheet, I would like to be able to
permanently remove all the macro code so that when a new user is sent the
formatted Excel worksheet, there is no pop-up window warning about Macros and
there are no Macros within the macro window.

What would be the code to have a macro permanently erase itself, without at
trace, from an Excel worksheet

Jim Thomlinson

Macro code to remove a macro after it executes
 
Check out this link...

http://www.cpearson.com/excel/vbe.htm
--
HTH...

Jim Thomlinson


"Charles" wrote:

After I run a macro to format an Excel worksheet, I would like to be able to
permanently remove all the macro code so that when a new user is sent the
formatted Excel worksheet, there is no pop-up window warning about Macros and
there are no Macros within the macro window.

What would be the code to have a macro permanently erase itself, without at
trace, from an Excel worksheet


charles

Macro code to remove a macro after it executes
 
I appreciate the help. Not being a programmer I am unsure as to which of the
many codes listed will do the one I want as well as to how to append it to
have it as a single macro instead of multiple.

Please advise.

"Jim Thomlinson" wrote:

Check out this link...

http://www.cpearson.com/excel/vbe.htm
--
HTH...

Jim Thomlinson


"Charles" wrote:

After I run a macro to format an Excel worksheet, I would like to be able to
permanently remove all the macro code so that when a new user is sent the
formatted Excel worksheet, there is no pop-up window warning about Macros and
there are no Macros within the macro window.

What would be the code to have a macro permanently erase itself, without at
trace, from an Excel worksheet


Dave Peterson

Macro code to remove a macro after it executes
 
How about just putting the macro into a different workbook.

Then you can open the macro workbook whenever you need to.

Make sure the worksheet to be formatted is active
tools|macro|macros...|and run your code.

Then you don't have to keep more than one copy of the code and never have to
worry about removing it from the data workbook.

Charles wrote:

After I run a macro to format an Excel worksheet, I would like to be able to
permanently remove all the macro code so that when a new user is sent the
formatted Excel worksheet, there is no pop-up window warning about Macros and
there are no Macros within the macro window.

What would be the code to have a macro permanently erase itself, without at
trace, from an Excel worksheet


--

Dave Peterson

charles

Macro code to remove a macro after it executes
 
This is a good idea, however, the outcome is to have all macros removed from
the file itself so that when the macro finishes running, the file can be sent
to people free of macros.

Please advise.


"Dave Peterson" wrote:

How about just putting the macro into a different workbook.

Then you can open the macro workbook whenever you need to.

Make sure the worksheet to be formatted is active
tools|macro|macros...|and run your code.

Then you don't have to keep more than one copy of the code and never have to
worry about removing it from the data workbook.

Charles wrote:

After I run a macro to format an Excel worksheet, I would like to be able to
permanently remove all the macro code so that when a new user is sent the
formatted Excel worksheet, there is no pop-up window warning about Macros and
there are no Macros within the macro window.

What would be the code to have a macro permanently erase itself, without at
trace, from an Excel worksheet


--

Dave Peterson



All times are GMT +1. The time now is 04:47 AM.

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