Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.24 KB

Excel.Shape.AutoShapeType.md

File metadata and controls

49 lines (30 loc) · 1.24 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Shape.AutoShapeType property (Excel)
vbaxl10.chm636091
vbaxl10.chm636091
Excel.Shape.AutoShapeType
3fdc36be-dd08-4fa1-8cef-a5ecf913eae0
05/14/2019
medium

Shape.AutoShapeType property (Excel)

Returns or sets the shape type for the specified Shape or ShapeRange object, which must represent an AutoShape other than a line, freeform drawing, or connector. Read/write MsoAutoShapeType.

Syntax

expression.AutoShapeType

expression A variable that represents a Shape object.

Remarks

When you change the type of a shape, the shape retains its size, color, and other attributes.

Use the Type property of the ConnectorFormat object to set or return the connector type.

Example

This example replaces all 16-point stars with 32-point stars in myDocument.

Set myDocument = Worksheets(1) 
For Each s In myDocument.Shapes 
    If s.AutoShapeType = msoShape16pointStar Then 
        s.AutoShapeType = msoShape32pointStar 
    End If 
Next

[!includeSupport and feedback]