获取当前的Excel版本内置的工具栏的名称和类型
Dim oCmdBar As CommandBar
Dim i, temp[a1:c1] = Array("在集合中引用的名称", "当前系统的菜单名称", "类型")
i = 2
For Each oCmdBar In Application.CommandBars
Select Case oCmdBar.Type
Case 0
temp = "msoBarTypeNormal"
Case 1
temp = "msoBarTypeMenuBar"
Case 2
temp = "msoBarTypePopup"
End Select
Cells(i, 1) = oCmdBar.Name
Cells(i, 2) = oCmdBar.NameLocal
Cells(i, 3) = temp
i = i + 1
Next