Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have been playing with this. From the archives. Deletes all macros.
Sometimes it deletes itself, sometimes it does not.Can it be fixed so it always deletes itself? Sub DeleteAllMacros() Dim Composantvbe As Object With ThisWorkbook.VBProject For Each Composantvbe In .VBComponents If Composantvbe.Type = 100 Then With Composantvbe.CodeModule .DeleteLines 1, .CountOfLines .CodePane.Window.Close End With Else: .VBComponents.Remove Composantvbe End If Next Composantvbe ActiveWorkbook.Save ActiveWorkbook.Close End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Macro Security Problem - Trusted macros not running for users (but do run for domain admins) | Excel Programming | |||
Running Macros | Links and Linking in Excel | |||
How to stop file open macro prompt after deleting all macros? | Excel Worksheet Functions | |||
macro warning persists even after deleting all macros | Excel Discussion (Misc queries) | |||
Running Macros | Excel Programming |