Delete All Macros

A few years ago I needed to create a procedure which moved a sheet with macros in the sheet and saved the sheet.  Only problem was that I did not want the freshly created sheet to have macros in the new workbook.  So I needed to create part of the procedure which would remove all of the macros in the freshly created workbook.

The following is the procedure I came up with.

Sub DeleteAllMacros() 'Excel vba to delete all macros in new workbook.
Dim otmp As Object

With ActiveWorkbook.VBProject
For Each otmp In .VBComponents
If otmp.Type=100 Then
otmp.CodeModule.DeleteLines 1, otmp.CodeModule.CountOfLines
otmp.CodeModule.CodePane.Window.Close
Else: .VBComponents.Remove otmp
End If
Next otmp
End With
End Sub

The procedure seemed to work fine.  I won't attach a workbook as testing it will be difficult.  I would like to hear how you go with it though.