|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
我建意兄弟把这段代码,放在你表格中关闭事件内,要不然好多兄弟就没有菜单栏了.
Sub HuiFu() '恢复模块
ActiveWindow.DisplayHeadings = True '恢复行号列标
ActiveWindow.DisplayWorkbookTabs = True '恢复工作表标签
ActiveWorkbook.Protect , , False '恢复工作表左上角图标和右上角最小化/最大化/关闭按钮
With Application
.CommandBars.DisableAskAQuestionDropdown = False '恢复帮助
.CommandBars("Standard").Visible = True '恢复常用工具栏
.CommandBars("Formatting").Visible = True '恢复格式工具栏
.CommandBars("Stop Recording").Visible = True '恢复常用工具栏
.CommandBars("ply").Enabled = True '恢复工作表标签右键
.CommandBars("cell").Enabled = True '恢复工作表右键
.DisplayFormulaBar = True '恢复编辑栏
.DisplayStatusBar = True
.Caption = "" '恢复标题栏
With .CommandBars(1)
.Controls("文件(&F)").Visible = True '恢复工作表菜单
.Controls("编辑(&E)").Visible = True
.Controls("视图(&V)").Visible = True
.Controls("插入(&I)").Visible = True
.Controls("格式(&O)").Visible = True
.Controls("工具(&T)").Visible = True
.Controls("数据(&D)").Visible = True
.Controls("窗口(&W)").Visible = True
.Controls("帮助(&H)").Visible = True
End With
End Sub |
|