Sub 删除()
Dim wbk As Workbook
Dim vbp As VBComponent
Set wbk = ActiveWorkbook
For Each vbp In wbk.VBProject.VBComponents
If vbp.Type = vbext_ct_Document Then
vbp.CodeModule.DeleteLines 1, vbp.CodeModule.CountOfLines
Else
wbk.VBProject.VBComponents.Remove vbc
End If
Next作者: Hsieh 時間: 2010-8-23 10:03