M
maperalia
I have this statement to kill two modules (see below). However, for some
reason these modules are not deleted after the macro is run.
Could you please check it and help me to make it run.
Thanks in advance.
Maperalia.
P.D. This statement is located in the "Module 2"
'***************************************************************
'KILL TWO MODULES
Dim VBComp As VBComponent
Dim VBComp1 As VBComponent
Application.ScreenUpdating = False
Waiting_Message.Repaint
On Error Resume Next
Set VBComp = ActiveWorkbook.VBProject.VBComponents("Module2")
ActiveWorkbook.VBProject.VBComponents.Remove VBComp
Waiting_Message.Repaint
Set VBComp1 = ActiveWorkbook.VBProject.VBComponents("Module7")
ActiveWorkbook.VBProject.VBComponents.Remove VBComp1
On Error GoTo 0
'***************************************************************
reason these modules are not deleted after the macro is run.
Could you please check it and help me to make it run.
Thanks in advance.
Maperalia.
P.D. This statement is located in the "Module 2"
'***************************************************************
'KILL TWO MODULES
Dim VBComp As VBComponent
Dim VBComp1 As VBComponent
Application.ScreenUpdating = False
Waiting_Message.Repaint
On Error Resume Next
Set VBComp = ActiveWorkbook.VBProject.VBComponents("Module2")
ActiveWorkbook.VBProject.VBComponents.Remove VBComp
Waiting_Message.Repaint
Set VBComp1 = ActiveWorkbook.VBProject.VBComponents("Module7")
ActiveWorkbook.VBProject.VBComponents.Remove VBComp1
On Error GoTo 0
'***************************************************************