다음을 통해 공유


Shape.LockAspectRatio Property (Excel)

True if the specified shape retains its original proportions when you resize it. False if you can change the height and width of the shape independently of one another when you resize it. Read/write MsoTriState.

Syntax

.LockAspectRatio

A variable that represents a Shape object.

Remarks

MsoTriState can be one of these MsoTriState constants.

msoCTrue

msoFalse. You can change the height and width of the shape independently of one another when you resize it.

msoTriStateMixed

msoTriStateToggle

msoTrue. The specified shape retains its original proportions when you resize it.

Example

This example adds a cube to myDocument. The cube can be moved and resized, but not reproportioned.

Set myDocument = Worksheets(1) 
myDocument.Shapes.AddShape(msoShapeCube, _ 
    50, 50, 100, 200).LockAspectRatio = msoTrue

참고 항목

개념

Shape Object

Shape Object Members