Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Remove Macro

I have a complex data formatting macro. When the macro is completed, I need
to remove it before the files goes to the end user. Can a macro remove
itsself?

Open to suggestions (needs to be done programatically)
--
bnhcomputing
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Remove Macro

Hi BNH,

Originally from Chip Pearson:

'==============
Sub SelfDestruct()

Dim VBCodeMod As CodeModule
Dim StartLine As Long
Dim HowManyLines As Long

Set VBCodeMod = ThisWorkbook.VBProject.VBComponents("NewModule").C odeModule
With VBCodeMod
StartLine = .ProcStartLine("SelfDestruct", vbext_pk_Proc)
HowManyLines = .ProcCountLines("SelfDestruct", vbext_pk_Proc)
.DeleteLines StartLine, HowManyLines
End With

End Sub
'<<==============

---
Regards,
Norman



"bnhcomputing" wrote in message
...
I have a complex data formatting macro. When the macro is completed, I
need
to remove it before the files goes to the end user. Can a macro remove
itsself?

Open to suggestions (needs to be done programatically)
--
bnhcomputing



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Remove Macro

Check out this link...

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

Jim Thomlinson


"bnhcomputing" wrote:

I have a complex data formatting macro. When the macro is completed, I need
to remove it before the files goes to the end user. Can a macro remove
itsself?

Open to suggestions (needs to be done programatically)
--
bnhcomputing

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Remove Macro

All you should need to know can be found at Chip Pearson's site.

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


Gord Dibben Excel MVP

On Tue, 27 Sep 2005 14:55:01 -0700, bnhcomputing
wrote:

I have a complex data formatting macro. When the macro is completed, I need
to remove it before the files goes to the end user. Can a macro remove
itsself?

Open to suggestions (needs to be done programatically)


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Remove Macro

It seems the only one who did not reply to this thread was Chip...
--
HTH...

Jim Thomlinson


"Gord Dibben" wrote:

All you should need to know can be found at Chip Pearson's site.

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


Gord Dibben Excel MVP

On Tue, 27 Sep 2005 14:55:01 -0700, bnhcomputing
wrote:

I have a complex data formatting macro. When the macro is completed, I need
to remove it before the files goes to the end user. Can a macro remove
itsself?

Open to suggestions (needs to be done programatically)





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 a Macro stew Excel Discussion (Misc queries) 2 November 8th 08 02:03 AM
Macro - Remove #n/a Schwimms Excel Discussion (Misc queries) 3 February 14th 08 06:29 PM
Macro to Remove Macro Text Rob Excel Discussion (Misc queries) 1 June 21st 07 11:49 PM
remove macro Ron New Users to Excel 2 June 1st 06 02:57 PM
Remove Macro Hargrove[_2_] Excel Programming 3 June 9th 04 06:33 PM


All times are GMT +1. The time now is 06:30 PM.

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

About Us

"It's about Microsoft Excel"