Sets or gets the distance from the top edge of the specified command bar, to the top edge of the screen. For docked command bars, this property returns or sets the distance from the command bar to the top of the docking area. 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.Top

expression Required. A variable that represents a object.

Example

This example positions the upper-left corner of the floating command bar named "Custom" 140 pixels from the left edge of the screen and 100 pixels from the top of the screen.

Visual Basic for Applications
Set myBar = CommandBars("Custom") myBar.Position = msoBarFloating With myBar .Left = 140 .Top = 100 End With

See also: