Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Protected Macro Code from Excel Module TGV[_2_] Excel Discussion (Misc queries) 4 August 24th 09 04:10 PM
Macro to Remove Macro Text Rob Excel Discussion (Misc queries) 1 June 21st 07 11:49 PM
VBA line of code executes in Immediate Window but not in Code Window [email protected] Excel Discussion (Misc queries) 2 April 30th 07 02:52 PM
SAveAs executes combobox code Alan Lyall Excel Programming 3 June 9th 04 12:52 AM
excel executes only a part of a macro mgr[_2_] Excel Programming 2 January 15th 04 07:18 AM


All times are GMT +1. The time now is 02:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"