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

返回或设置指定形状的阴影的垂直偏移量 (以为单位)。Returns or sets the vertical offset of the shadow from the specified shape, in points. 正值表示阴影向下偏移, 而负值表示。值为负值时将其偏移。A positive value offsets the shadow down; a negative value offsets it up. 读/写 SingleRead/write Single.



_表达式_一个代表**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.


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

支持和反馈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.