• pasang iklan

SELF DELLETING MACRO - DESTRUCTION YOUR CODE

You can run a macro that delete the whole module where
you store the macro's after ir run the code
This example use "Module1"

Sub test()

' your code

With ThisWorkbook.VBProject.VBComponents
.Remove .Item("Module1")
End With
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)

---------------

Add this sub in a module called Module1 in a new workbook
to test it.
If you run the macro you see the MsgBox and after
that your module will be deleted


Sub test()

MsgBox "place your code here"

With ThisWorkbook.VBProject.VBComponents
.Remove .Item("Module1")
End With
End Sub

----------------

Link

1 comments:

Unknown said...

Application.DisplayAlerts = False
ActiveWorkbook.VBProject.VBComponents.Remove ActiveWorkbook.VBProject.VBComponents("Module1")

Post a Comment

Kategori Iklan