Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Delete VB/Macro Sheet

  Asked By: Callum    Date: Mar 24    Category: MS Office    Views: 1050
  

Is there a way to delete/modify a VB/Macro module code by running
another module?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Calandre Bernard     Answered On: Mar 24

I can provide one solution to delete one module from Excel VBA Project
suppose that there are 2 module files : Module1 and Module2
I will write one function in Module1 to remove Module2

========================

Sub deleteModule2()
Set com = ThisWorkbook.VBProject.VBComponents.Item("Module2")

ThisWorkbook.VBProject.VBComponents.Remove (com)

End Sub

========================

 
Didn't find what you were looking for? Find more on Delete VB/Macro Sheet Or get search suggestion and latest updates.




Tagged: