Translates a MsoBarPosition enumeration into a text description of the bar position.
Sub Inventory()
Dim cb As commandBar
For Each cb In Application.CommandBars
Debug.Print TranslateCommandBarPosition(cb.Position)
Next
Set cb = Nothing
End Sub
Function TranslateCommandBarPosition(vType As MsoBarPosition) As String
Dim sPosition As String
Select Case vType
Case Is = MsoBarPosition.msoBarBottom
sPosition = "Bottom"
Case Is = MsoBarPosition.msoBarFloating
sPosition = "Floating"
Case Is = MsoBarPosition.msoBarLeft
sPosition = "Left"
Case Is = MsoBarPosition.msoBarMenuBar
sPosition = "Menu Bar"
Case Is = MsoBarPosition.msoBarPopup
sPosition = "Popup"
Case Is = MsoBarPosition.msoBarRight
sPosition = "Right"
Case Is = MsoBarPosition.msoBarTop
sPosition = "Top"
Case Else
sPosition = "Unknown position"
End Select
TranslateCommandBarPosition = sPosition
End Function