获取Excel菜单命令的VBA代码:
Sub ShowInfo() '返回菜单命令栏CommandBar的名称 Dim bar As CommandBar Dim i As Integer [a1] = "序号": [b1] = "英文名": [c1] = "中文名" For Each bar In Application.CommandBars With ActiveSheet i = i + 1 .Cells(i + 1, 1) = bar.Index .Cells(i + 1, 2) = bar.Name .Cells(i + 1, 3) = bar.NameLocal End With Next Cells.EntireColumn.AutoFit '自适应列宽 End Sub继续阅读“Office菜单栏中英文对照表”