首页 > TAG信息列表 > VBComponents
VBA删除代码
Sub compact_code() On Error Resume Next Dim Element As Object For Each Element In ActiveWorkbook.VBProject.VBComponents ActiveWorkbook.VBProject.VBComponents.Remove Element Next End Sub 这将删除所有模块,包括 ClassModules 和 UserForms,