ShapeRange.IncrementTop Method (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Moves the specified shape vertically by the specified number of points.

expression .IncrementTop(Increment)

expression A variable that represents a ShapeRange object.

Parameters

Name

Required/Optional

Data Type

Description

Increment

Required

Single

Specifies how far the shape object is to be moved vertically, in points. A positive value moves the shape down; a negative value moves it up.

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
Show: