前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >EXCEL 自定义菜单

EXCEL 自定义菜单

作者头像
Tony老师
发布2020-03-05 11:34:14
5060
发布2020-03-05 11:34:14
举报
文章被收录于专栏:托老师

Sub XXXscrap()

Dim XXX As CommandBarPopup Dim scrap As CommandBarPopup Dim about As CommandBarControl

Dim finderror As CommandBarControl Dim cleanup As CommandBarControl Dim updatascrap As CommandBarControl

‘菜单栏出现公司名称 Set XXX = Application.CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlPopup) XXX.Caption = "XXX公司"

‘点击XXX公司,出现两个子项 Set scrap = XXX.CommandBar.Controls.Add(Type:=msoControlPopup) scrap.Caption = "Scrap"

Set about = XXX.CommandBar.Controls.Add(Type:=msoControlButton, ID:=2950) about.Caption = "About" about.OnAction = "abouttony"

‘点击scrap,出现三个子项 Set cleanup = scrap.CommandBar.Controls.Add(Type:=msoControlButton) cleanup.Caption = "Clean up data" cleanup.OnAction = "cleanuptony"

Set finderror = scrap.CommandBar.Controls.Add(Type:=msoControlButton) finderror.Caption = "Find error data" finderror.OnAction = "finderrortony"

Set updatascrap = scrap.CommandBar.Controls.Add(Type:=msoControlButton) updatascrap.Caption = "Updata Scrap" updatascrap.OnAction = "updatascraptony"

End Sub

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2008-07-02,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档