Originariamente inviato da elemiah
Ciao, rieccomi dopo avere fatto una ricerca più precisa e grazie al tuo spunto, ho trovato del codice e l'ho modificato al mio bisogno, ecco di seguito le modifiche che ho aggiunto al tuo codice:
.........................
With ActiveWorkbook.VBProject
For Each VBC In .VBComponents
If VBC.Type = 100 Then
With VBC.CodeModule
.DeleteLines 1, .CountOfLines
.CodePane.Window.Close
End With
Else: .VBComponents.Remove VBC
End If
Next VBC
End With
.......................
Non sapevo che VBA esponesse una collection .VBProject...
Interessante... il codice che modifica... sé stesso !

Ciao.