RowIndex Property

Applies To

CommandBar object.

Description

Returns or sets the docking order of the specified 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 Long.

Remarks

Command bars with lower numbers are docked first. Several command bars can share the same row index. 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 1.

Set myBar = CommandBars("Custom")
With myBar
    .RowIndex = 1
    .Left = 140
End With