打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
VBA Excel 创建菜单栏 工具栏

VBA Excel 创建菜单栏 工具栏

Option Explicit

Sub ComReset() '删除 "我的工具栏" 菜单
    Application.CommandBars("我的工具栏").Delete
End Sub

Sub 新建工具栏()
    Application.CommandBars.Add(Name:="我的工具栏").Visible = True '新建一个自定义工具栏,名为我的工具栏,并可见。
    Application.CommandBars("我的工具栏").Controls.Add Type:=msoControlButton, ID:=3, Before:=1 '添加保存按钮,在第一个位置
    Application.CommandBars("我的工具栏").Controls.Add Type:=msoControlButton, ID:=1849, Before:=2 '添加查找按钮,在第二个位置
    Application.CommandBars("我的工具栏").Controls.Add Type:=msoControlButton, ID:=295, Before:=3 '添加插入单元格按钮
    Application.CommandBars("我的工具栏").Controls.Add Type:=msoControlButton, ID:=395, Before:=4  '添加货币样式按钮
End Sub

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
excel 隐藏缺省界面的vba代码 隐藏Excel2003菜单栏和工具栏
VBA|自定义菜单栏、工具栏、功能区
VBA通用代码:在Excel中创建弹出菜单
Excel VBA 工具栏隐藏、显示
excel菜单栏和右键菜单被屏蔽的解决办法
[VBA]Excel工具栏代码
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服