z toho vaseho textu je dost nejasne o co vam ide ale tu mate kod nato aby ste mohli vymazat vsetky kodt vo vsetkych aktivnych workbook-ov. Hadam vam to pomoze. (samozrejme ked bude mazat sam seba tak to zbugne :)).
Sub test()
Dim aVBComponent As Object
Dim aWorkbook As Workbook
For Each aWorkbook In Workbooks
For Each aVBComponent In aWorkbook.VBProject.VBComponents
aVBComponent.CodeModule.DeleteLines 1, aVBComponent.CodeModule.CountOfLines
Next
Next
End Subcitovat
Sub test()
Dim aVBComponent As Object
Dim aWorkbook As Workbook
For Each aWorkbook In Workbooks
For Each aVBComponent In aWorkbook.VBProject.VBComponents
aVBComponent.CodeModule.DeleteLines 1, aVBComponent.CodeModule.CountOfLines
Next
Next
End Subcitovat