ShapeRange.IncrementRotation 方法 (Excel)ShapeRange.IncrementRotation method (Excel)

會以指定的度數為遞增值,變更指定的圖案繞 Z 軸的旋轉角度。Changes the rotation of the specified shape around the z-axis by the specified number of degrees. 使用 Rotation 屬性來設定圖案的絕對旋轉角度。Use the Rotation property to set the absolute rotation of the shape.

語法Syntax

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

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

參數Parameters

名稱Name 必要/選用Required/Optional 資料類型Data type 描述Description
IncrementIncrement 必要Required SingleSingle 會指定圖案沿水平方向旋轉的角度 (以度為單位)。Specifies how far the shape is to be rotated horizontally, in degrees. 正值會讓圖案依順時針方向旋轉,負值則會讓圖案依逆時針方向旋轉。A positive value rotates the shape clockwise; a negative value rotates it counterclockwise.

註解Remarks

若要讓立體圖案繞 x 軸或 y 軸的旋轉,請使用 IncrementRotationX 方法或 IncrementRotationY 方法。To rotate a three-dimensional shape around the x-axis or the y-axis, use the IncrementRotationX method or the IncrementRotationY method.

範例Example

本範例複製 myDocument 上的第一個圖案,設定複製圖案的填滿格式,將其向右移動 70 點,向上移動 50 點,然後按順時針方向旋轉 30 度。This example duplicates shape one on myDocument, sets the fill for the duplicate, moves it 70 points to the right and 50 points up, and rotates it 30 degrees clockwise.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(1).Duplicate 
 .Fill.PresetTextured msoTextureGranite 
 .IncrementLeft 70 
 .IncrementTop -50 
 .IncrementRotation 30 
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.