Top Property

Applies To

Assistant object, CommandBar object, CommandBarButton object, CommandBarComboBox object, CommandBarControl object, CommandBarPopup object.

Description

CommandBar or CommandBarControl object: Returns or sets the distance (in pixels) from the top edge of the specified command bar or command bar control 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 Long for CommandBar, read-only Long for CommandBarControl.

Assistant object: Sets or returns the vertical position of the Office Assistant window (in points), relative to the screen. Read/write Integer.

See Also

Left property.

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.

Set myBar = CommandBars("Custom")
myBar.Position = msoBarFloating
With myBar
    .Left = 140
    .Top = 100
End With
This example moves the Office Assistant to the specified coordinate.

Assistant.Top = 500