目录

Left 属性

优质
小牛编辑
123浏览
2023-12-01

全部显示

本主题中的某些内容可能不适用于某些语言。

Left 属性应用于 AssistantCommandBar 对象的情形。

从指定对象的左边相对于屏幕的左边,以点数为单位设置或返回“Office 助手”窗口的水平位置,或以像素为单位设置或返回命令栏的距离。Long 类型,可读写。

expression.Left

expression 必需。该表达式返回上面对象之一。

Left 属性应用于 CommandBarButtonCommandBarComboBoxCommandBarControlCommandBarPopup 对象的情形。

以像素为单位设置或返回指定命令栏控件相对于屏幕左边缘的水平位置。返回与固定区域左边的距离。Long 类型,只读。

expression.Left

expression 必需。该表达式返回上面对象之一。

示例

应用于 AssistantCommandBar 对象的情形。

本示例显示“Office 助手”并将其移动到窗口中指定的位置。

With Assistant
 .Visible = True
 .Left = 300
 .Top = 300
End With

本示例将名为 Custom 的命令栏从其固定位置沿窗口顶部移动窗口的左边。

Set myBar = CommandBars("Custom")
With myBar
 .Position = 1
 .RowIndex = 2
 .Left = 0
End With