不知道是否有直接检测是否已经存在某按钮的属性,我用枚举测试也不知道如何做,这么写是错误的:
Set ocb = Application.CommandBars("Standard")
For Each Item In ocb '这里出错了
If Item.Name = "xxx" Then mark = True: Exit For
Next
...全文
220回复打赏收藏
如何在常用工具栏中添加一个宏按钮?如何检测是否已有,否则重复添加会出错
不知道是否有直接检测是否已经存在某按钮的属性,我用枚举测试也不知道如何做,这么写是错误的: Set ocb = Application.CommandBars("Standard") For Each Item In ocb '这里出错了 If Item.Name = "xxx" Then mark = True: Exit For Next