ShadowFormat.OffsetY 属性 (Excel)ShadowFormat.OffsetY property (Excel)

返回或设置阴影相对指定形状的垂直偏移量(以磅为单位)。Returns or sets the vertical offset of the shadow from the specified shape, in points. 正值表示负值表示阴影向图形; 右侧读它的左侧。A positive value offsets the shadow to the right of the shape; a negative value offsets it to the left. 读/写单个Read/write Single.

语法Syntax

表达式expression. OffsetY

_表达式_一个代表ShadowFormat对象的变量。expression A variable that represents a ShadowFormat object.

备注Remarks

如果您想要微移阴影水平或垂直从其当前位置而无需指定其绝对位置,请使用**IncrementOffsetX** 方法或**IncrementOffsetY** 方法。If you want to nudge a shadow horizontally or vertically from its current position without having to specify an absolute position, use the IncrementOffsetX method or the IncrementOffsetY method.

示例Example

本示例将第三个形状的阴影的水平和垂直偏移量设置在myDocumentThis example sets the horizontal and vertical offsets for the shadow of shape three on myDocument. 阴影的偏移量设置为在形状右边 5 磅、上边 3 磅。The shadow is offset 5 points to the right of the shape and 3 points above it. 如果形状原来无阴影,以下示例为它添加阴影。If the shape doesn't already have a shadow, this example adds one to it.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(3).Shadow 
 .Visible = True 
 .OffsetX = 5 
 .OffsetY = -3 
End With

另请参阅See also

ShadowFormat 对象ShadowFormat Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.