Skip to main content

Shape.LockAspectRatio property

Table of contents
  1. Syntax
  2. Example

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

expression.LockAspectRatio

expression A variable that represents a Shape object.

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

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>