Deleting a Sub or Function from a Module via Code 
Author Message
 Deleting a Sub or Function from a Module via Code

Is it possible to delete a sub-routine or function from a module using VBA.
I have a project that would require me to "redo" a sub or function on the
fly so I would need to delete the original sub or function and then replace
it with the new one.  Thanks,

Joe



Tue, 04 Jun 2002 03:00:00 GMT  
 Deleting a Sub or Function from a Module via Code
Hi Joe,

You can by using the Module Object. Access help has some good information on
this.

Using the module object you can read, edit and save changes in code.

However, I would not recommend this in a production application. Too many
things could go wrong and you could end up with unusable code.

Cheers,

Calum Reay
Paradox Contracting Ltd
http://www.pcltd.co.uk


Quote:
> Is it possible to delete a sub-routine or function from a module using
VBA.
> I have a project that would require me to "redo" a sub or function on the
> fly so I would need to delete the original sub or function and then
replace
> it with the new one.  Thanks,

> Joe



Wed, 05 Jun 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing Value from Module Function to Form sub problem

2. Incongruous out of memory error when trying to add a function or sub to a module

3. Calling a sub or function using a variable through another sub or function

4. Returning sub or function name within a specific sub or function

5. Form, module, class and sub or function names at runtime

6. Local function/sub inside function/sub

7. Retrieve name of current sub/function and name of current module

8. How to Use Access module functions via VB app with ADO

9. Filter in Subforms via Module-Function

10. Code Module for Deleted Report

11. delete all code modules using VBA

12. Acc97: Turning off Cascading Deletes via program code

 

 
Powered by phpBB® Forum Software