Sub 添加按钮和控件()
Dim 工具栏 As CommandBar
Dim 按钮 As CommandBarButton
Set 工具栏 = Application.CommandBars.Add
With 工具栏
.Name = "我的工具栏"
.Visible = True
End With
Set 按钮 = 工具栏.Controls.Add(Type:=msoControlButton)
With 按钮
.Caption = "我的命令"
.FaceId = 17
.Style = msoButtonIconAndCaption
End With
End Sub 添加按钮并设置图标.rar(5.95 KB, 下载次数: 3)