LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
DS DS is offline
external usenet poster
 
Posts: 117
Default Deleting A Selected Macro from within a Module

Good morning all, hoping someone can assist with the following:

I'm effectively looking for a method to delete individual subs from within a
module.


3 subs, A, B & C in a single module.

Sub A is run, which in turn calls EITHER sub B or C based on user-defined
parameters.

I require a method to instruct Sub B to delete Sub C when run, and vice
versa. As Sub C is not required if Sub B is run etc.

I have tried adapting the technique for deleting a module, replacing the
module name with the sub name, but, as that doesn't work, I'm somewhat at a
loss!

Because of variables being passed Sub B - Sub A or Sub C - Sub A, I need
to keep them in the same module, so simply splitting them into separate
modules and deleting those modules isn't really an option.

Many thanks in advance,
DS
 
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
programming VBE - Deleting All Code From A Module pm Excel Discussion (Misc queries) 4 December 31st 05 01:21 AM
programming VBE - Deleting All Code From A Module pm[_2_] Excel Programming 4 December 31st 05 01:21 AM
Problem deleting vba module using vba code Michael Beckinsale Excel Programming 1 September 1st 05 04:38 PM
Deleting selected macro buttons rabbi Excel Programming 1 August 18th 05 09:26 AM
Deleting a module Grant Reid Excel Programming 3 August 4th 04 11:49 AM


All times are GMT +1. The time now is 07:16 AM.

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"