|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
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位的请问为什么运行此代码没有添加菜单呢?
|
|