Hi,
You can delete VBA code with
this same subject was covered in a similar thread a couple of days ago. See http://www.excelforum.com/excel-prog...n-copying.html![]()
Sub DeleteAllVBACode() Dim VBProj As VBIDE.VBProject Dim VBComp As VBIDE.VBComponent Dim CodeMod As VBIDE.CodeModule Set VBProj = ActiveWorkbook.VBProject For Each VBComp In VBProj.VBComponents VBProj.VBComponents.Remove VBComp Next VBComp End Sub
HTH
Bookmarks