vba屏蔽Excel中的菜单功能

更新时间:2023-07-08 08:24:58 阅读: 评论:0

vba屏蔽Excel中的菜单功能
1、屏蔽“菜单”中的项:眼睛总是流眼泪是什么原因
Application.CommandBars(1).Controls("⽂件(&F)").Enabled = Fal '屏蔽⽂件菜单
教育学专业Application.CommandBars(1).Controls("编辑(&E)").Enabled = Fal '屏蔽编辑菜单
苹果里的星星Application.CommandBars(1).Controls("视图(&V)").Enabled = Fal '屏蔽视图菜单
Application.CommandBars(1).Controls("插⼊(&I)").Enabled = Fal '屏蔽插⼊菜单
Application.CommandBars(1).Controls("格式(&O)").Enabled = Fal '屏蔽格式菜单
Application.CommandBars(1).Controls("⼯具(&T)").Enabled = Fal '屏蔽⼯具菜单
Application.CommandBars(1).Controls("数据(&D)").Enabled = Fal '屏蔽数据菜单
花的词语Application.CommandBars(1).Controls("窗⼝(&W)").Enabled = Fal '屏蔽窗⼝菜单
有时候造句Application.CommandBars(1).Controls("帮助(&H)").Enabled = Fal '屏蔽帮助菜单
雀的笔顺
2、屏蔽“菜单”中的⼦项:
Application.CommandBars(1).Controls("编辑(&E)").Controls("填充(&I)").Enabled = Fal '屏蔽“编辑”菜单中的“填充”项Application.CommandBars(1).Controls("⼯具(&T)").Controls("选项(&O)...").Visible = Fal '去除⼯具-选项
Application.CommandBars(1).Controls("⼯具(&T)").Controls("选项(&O)...").Enabled = Fal '⼯具-选项变灰⾊
3、禁⽤粘贴:
Application.CommandBars("Cell").Controls("粘贴(&P)").Enabled = Fal '禁⽤右键粘贴
Application.CommandBars("Cell").Controls("选择性粘贴(&S)...").Enabled = Fal
Application.CommandBars(1).Controls("编辑(&E)").Controls("粘贴(&P)").Enabled = Fal
Application.CommandBars(1).Controls("编辑(&E)").Controls("选择性粘贴(&S)...").Enabled = Fal
Application.CommandBars(1).Controls("编辑(&E)").Controls("office 剪贴板(&B)...").Enabled = Fal
Application.CommandBars(3).Controls("粘贴(&P)").Enabled = Fal
Application.CommandBars.DisableCustomize = True
毛细血管壁4、其他
Application.CommandBars(1).Controls("⼯具(&T)").Controls("⾃定义(&C)...").Enabled = Fal
Application.OnKey "^v", "" '禁⽤键盘"Ctrl+V"
Application.OnKey "^v" '恢复键盘"Ctrl+V"
Application.CommandBars.DisableAskAQuestionDropdown = True '去除⼯作表右上⾓的帮助栏
Application.CommandBars("Reviewing").Visible = Fal '屏蔽审阅
Application.CommandBars("Formula Auditing").Visible = Fal '屏蔽公式审核
Application.CommandBars("Control Toolbox").Visible = Fal '屏蔽控件⼯具箱
Application.CommandBars("Stop Recording").Visible = Fal '屏蔽录制宏
资料管理Application.CommandBars("Forms").Visible = Fal '屏蔽窗体
Application.CommandBars("Drawing").Visible = Fal '屏蔽绘图
5、屏蔽/解除整段代码:
视图-》⼯具栏-》编辑,选中代码,然后在编辑的⼯具栏⾥“设置注释块和“解除注释块”按钮
Application.EnableCancelKey = xlDisabled '应⽤程序的EnableCancelKey=完全禁⽤“取消”键捕获功能
Application.EnableCancelKey = xlInterrupt '应⽤程序的EnableCancelKey=中断当前运⾏程序,⽤户可进⾏调试或结束程序的运⾏

本文发布于:2023-07-08 08:24:58,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1072717.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:屏蔽   菜单   编辑
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图