Excel 2016中的代码片段是否兼容? [英] Is the snippet of codes compatible in Excel 2016?
本文介绍了Excel 2016中的代码片段是否兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
用于以下工作的代码:
Sub auto_open()
'
  On Error Resume Next
MenuBars(" xxxx")。删除
MenuBars.Add(" xxxx")
使用MenuBars(" xxxx")。菜单
。添加"x1"
。添加"x2"
。添加"x3"
结束与$
End Sub
Sub auto_open()
'
On Error Resume Next
MenuBars("xxxx").Delete
MenuBars.Add ("xxxx")
With MenuBars("xxxx").Menus
.Add "x1"
.Add "x2"
.Add "x3"
End With
End Sub
推荐答案
菜单和Excel 2003及更早版本的工具栏结构已替换为Excel 2007及更高版本中的所谓功能区。您仍然可以使用VBA创建和编辑自定义工具栏;它们将显示在功能区的"加载项"选项卡中。但菜单栏
不再有效。
The menu and toolbar structure of Excel 2003 and before has been replaced with the so-called ribbon in Excel 2007 and later. You can still create and edit custom toolbars using VBA; they will be displayed in the Add-Ins tab of the ribbon. But menu bars don't work anymore.
这篇关于Excel 2016中的代码片段是否兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文