excel如何把菜单栏全部隐藏?
我看有人用VB做了个excel应用,打开后,excel上面自带的菜单栏都隐藏了,这是如何做到的?...
我看有人用VB做了个excel应用,打开后,excel上面自带的菜单栏都隐藏了,这是如何做到的?
展开
4个回答
展开全部
Sub 全屏()
If Application.DisplayFullScreen = True Then
Application.DisplayFullScreen = False
Application.CommandBars(1).Controls("文件(&F)").Visible = True '隐藏工作薄菜单
Application.CommandBars(1).Controls("编辑(&E)").Visible = True
Application.CommandBars(1).Controls("视图(&V)").Visible = True
Application.CommandBars(1).Controls("插入(&I)").Visible = True
Application.CommandBars(1).Controls("格式(&O)").Visible = True
Application.CommandBars(1).Controls("工具(&T)").Visible = True
Application.CommandBars(1).Controls("数据(&D)").Visible = True
Application.CommandBars(1).Controls("窗口(&W)").Visible = True
Application.CommandBars(1).Controls("帮助(&H)").Visible = True
Else
Application.DisplayFullScreen = True
Application.CommandBars(1).Controls("文件(&F)").Visible = False '恢复工作薄菜单
Application.CommandBars(1).Controls("编辑(&E)").Visible = False
Application.CommandBars(1).Controls("视图(&V)").Visible = False
Application.CommandBars(1).Controls("插入(&I)").Visible = False
Application.CommandBars(1).Controls("格式(&O)").Visible = False
Application.CommandBars(1).Controls("工具(&T)").Visible = False
Application.CommandBars(1).Controls("数据(&D)").Visible = False
Application.CommandBars(1).Controls("窗口(&W)").Visible = False
Application.CommandBars(1).Controls("帮助(&H)").Visible = False
End If
End Sub
If Application.DisplayFullScreen = True Then
Application.DisplayFullScreen = False
Application.CommandBars(1).Controls("文件(&F)").Visible = True '隐藏工作薄菜单
Application.CommandBars(1).Controls("编辑(&E)").Visible = True
Application.CommandBars(1).Controls("视图(&V)").Visible = True
Application.CommandBars(1).Controls("插入(&I)").Visible = True
Application.CommandBars(1).Controls("格式(&O)").Visible = True
Application.CommandBars(1).Controls("工具(&T)").Visible = True
Application.CommandBars(1).Controls("数据(&D)").Visible = True
Application.CommandBars(1).Controls("窗口(&W)").Visible = True
Application.CommandBars(1).Controls("帮助(&H)").Visible = True
Else
Application.DisplayFullScreen = True
Application.CommandBars(1).Controls("文件(&F)").Visible = False '恢复工作薄菜单
Application.CommandBars(1).Controls("编辑(&E)").Visible = False
Application.CommandBars(1).Controls("视图(&V)").Visible = False
Application.CommandBars(1).Controls("插入(&I)").Visible = False
Application.CommandBars(1).Controls("格式(&O)").Visible = False
Application.CommandBars(1).Controls("工具(&T)").Visible = False
Application.CommandBars(1).Controls("数据(&D)").Visible = False
Application.CommandBars(1).Controls("窗口(&W)").Visible = False
Application.CommandBars(1).Controls("帮助(&H)").Visible = False
End If
End Sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
不用VB的情况下,双击任一选项卡,也可以隐藏工具栏。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询