Display auto shapes : Shapes « Excel « VBA / Excel / Access / Word






Display auto shapes

 
Sub DisplayAutoShapes()
    Dim sh As Shape
    Dim i As Integer
    Set sh = ActiveSheet.Shapes.AddShape(1, 100, 100, 72, 72)
    For i = 1 To 138
       sh.AutoShapeType = i
       sh.Visible = True
       ActiveSheet.Cells(1, 1).Value = sh.AutoShapeType
       Delay 0.5
    Next i

End Sub

 








Related examples in the same category

1.Add a rectangle
2.Add a new shape
3.Draw a star
4.Delete all shapes