Gets or sets the docking order of a command bar in relation to other command bars in the same docking area. Can be an integer greater than zero, or either of the following MsoBarRow constants: msoBarRowFirst or msoBarRowLast. Read/write.

Note
The use of CommandBars in some Microsoft Office applications has been superseded by the new Ribbon user interface. For more information, search help for the keyword "Ribbon."

Syntax

expression.RowIndex

expression A variable that represents a CommandBar object.

Remarks

Several command bars can share the same row index, and command bars with lower numbers are docked first. If two or more command bars share the same row index, the command bar most recently assigned will be displayed first in its group.

Example

This example adjusts the position of the command bar named "Custom" by moving it to the left 110 pixels more than the default, and it makes this command bar the first to be docked by changing its row index to msoBarRowFirst.

Visual Basic for Applications
Set myBar = CommandBars("Custom") With myBar .RowIndex = msoBarRowFirst .Left = 140 End With
change the row index to one so the command bar will be docked first index command bars with lower numbers docked first ofv ROW row index Row Index Property RowIndex rowindex property set the docking order of a command bar relation to other command bars

See also: