Is it possible to use VBA to have a Macro delete itself once finished running?
Is it possible to use VBA to have a Macro delete itself once finished running?
Save the file as xlsx and it's gone
Hi there,
See if the code in the attached workbook does what you need. It contains two methods - one deletes just the routine itself, the other deletes the entire CodeModule which contains the routine.
The first VBA CodeModule contains the following code:
![]()
Please Login or Register to view this content.
The second VBA CodeModule contains the following code:
The highlighted values may be altered to suit your requirements.![]()
Please Login or Register to view this content.
Hope this helps - please let me know how you get on.
Regards,
Greg M
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks