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.


expressionexpression. OffsetY

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


如果您想要微移阴影水平或垂直从其当前位置而无需指定其绝对位置,请使用**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.


本示例将第三个形状的阴影的水平和垂直偏移量设置在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