Sub DeleteVBACodeFromWorkbook( _ wb As Workbook _ ) Dim _ vbc As VBComponent For Each vbc In wb.VBProject.VBComponents If vbc.Type <> vbext_ct_Document Then wb.VBProject.VBComponents.Remove vbc End If Next vbc End Sub
Sub DeleteVBACodeFromWorkbook( _ wb As Workbook _ ) Dim _ vbc As VBComponent For Each vbc In wb.VBProject.VBComponents If vbc.Type <> vbext_ct_Document Then wb.VBProject.VBComponents.Remove vbc End If Next vbc End Sub
Leave a Reply