Share via


Excel) (ThreeDFormat.RotationY 屬性

會傳回或設定立體圖案繞 Y 軸的旋轉角度,以度為單位。 可以是 -90 到 90 之間的值。 正值代表順向左; 旋轉為負值表示向右旋轉。 可讀寫 單一

語法

運算式RotationY

表達 代表 ThreeDFormat 物件的 變數。

註解

若要設定立體化圖案繞 X 軸的旋轉角度,請使用 RotationX 屬性。

若要設定立體圖案繞 z 軸的旋轉角度,請使用 Shape 物件的 Rotation 屬性。

若要變更的立體化延伸路徑方向但不旋轉其中的延伸部分正面,請使用 SetExtrusionDirection 方法。

範例

本範例會將三個相同的立體化橢圓形新增至 myDocument ,並將它們繞 Y 軸的旋轉分別設定為 -30、0 和 30 度。

Set myDocument = Worksheets(1) 
With myDocument.Shapes 
 With .AddShape(msoShapeOval, 30, 30, 50, 25).ThreeD 
 .Visible = True 
 .RotationY = -30 
 End With 
 With .AddShape(msoShapeOval, 30, 70, 50, 25).ThreeD 
 .Visible = True 
 .RotationY = 0 
 End With 
 With .AddShape(msoShapeOval, 30, 110, 50, 25).ThreeD 
 .Visible = True 
 .RotationY = 30 
 End With 
End With

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應