我需要从 75 个用户窗体中删除一些控件Excel
。我让VBA
代码循环遍历文件并使用VBIDE
,我删除了代码。但是,一直无法掌握控件。
与其在我尝试过的代码上浪费时间,不如说是我一直在使用的对象:
Dim VBProj As VBIDE.VBProject
Dim VBComp As VBIDE.VBComponent
Dim CodeMod As VBIDE.CodeModule
Dim CompItem As Object
Dim objVBFrm As UserForm
Set VBProj = ActiveWorkbook.VBProject
Set VBComp = VBProj.VBComponents("frmSend")
Set CodeMod = VBComp.CodeModule
Set objVBFrm = VBComp.Designer
With objVBFrm
.Controls.Remove chkNewCNV
End With
谢谢大家