ThreeDFormat.IncrementRotationY 方法 (Excel)ThreeDFormat.IncrementRotationY method (Excel)

按照指定的度數,變更指定圖案繞 Y 軸旋轉的角度。Changes the rotation of the specified shape around the y-axis by the specified number of degrees. 您可以使用 RotationY 屬性來設定圖案繞 Y 軸旋轉的絕對角度。Use the RotationY property to set the absolute rotation of the shape around the y-axis.

語法Syntax

運算式IncrementRotationY遞增值expression.IncrementRotationY (Increment)

_運算式_代表**ThreeDFormat** 物件的變數。expression A variable that represents a ThreeDFormat object.

參數Parameters

名稱Name 必要/選用Required/Optional 資料類型Data type 描述Description
IncrementIncrement 必要Required SingleSingle 指定圖案繞 Y 軸旋轉的變更量 (以度為單位)。Specifies how much (in degrees) the rotation of the shape around the y-axis is to be changed. 可以是介於-90 到 90 值。Can be a value from -90 through 90. 正值會使圖案向左傾斜,負值會使圖案向右傾斜。A positive value tilts the shape to the left; a negative value tilts it to the right.

註解Remarks

您不能調整指定的圖案繞 y 軸過去的RotationY屬性 (向-90 度旋轉 90 度) 的上方或下方限制。You cannot adjust the specified shape's rotation around the y-axis past the upper or lower limit for the RotationY property (90 degrees to -90 degrees). 例如,如果 RotationY 屬性最初設定為 80,而您將 Increment 引數指定為 40,則最後的旋轉角度將是 90 度 (即 RotationY 屬性值的上限),而不是 120 度。For example, if the RotationY property is initially set to 80 and you specify 40 for the Increment argument, the resulting rotation will be 90 (the upper limit for the RotationY property) instead of 120.

若要變更圖形繞 x 軸的旋轉角度,請使用 IncrementRotationX 方法。To change the rotation of a shape around the x-axis, use the IncrementRotationX method. 若要變更繞 z 軸的旋轉角度,請使用**IncrementRotationZ** 方法。To change the rotation around the z-axis, use the IncrementRotationZ method.

範例Example

本範例使 myDocument 中的第一個圖案向右旋轉 10 度。This example tilts shape one on myDocument 10 degrees to the right. 只有當第一個圖案是有深度的圖案時,才能看到本範例的效果。Shape one must be an extruded shape for you to see the effect of this code.

Set myDocument = Worksheets(1) 
myDocument.Shapes(1).ThreeD.IncrementRotationY -10

支援和意見反應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.