|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub auto_open()
On Error Resume Next
Dim aButton As Office.CommandBarButton
Dim aToolBar As Office.CommandBar
Set aToolBar = Application.CommandBars("Help")
Set aButton = aToolBar.FindControl(Type:=1, Tag:="taozi1")
If aButton Is Nothing Then
Set aButton = Application.CommandBars("Help").Controls.Add(Type:=msoControlButton, ID:=302, Before:=3)
aButton.Tag = "taozi1"
End If
Set aButton = aToolBar.FindControl(Type:=1, Tag:="taozi2") 'msoControlButton
If aButton Is Nothing Then
Set aButton = Application.CommandBars("Help").Controls.Add(Type:=msoControlButton, ID:=443, Before:=4)
aButton.Tag = "taozi2"
End If
End Sub
我excel的版是2016 64位的请问为什么运行此代码没有添加菜单呢?
|
|