1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Sub InsertionDesBidules()
Dim i As Long
Application.ScreenUpdating = False
Do While i < 2 'Err.Number = 0
ActiveSheet.Shapes.AddShape msoShapeRectangle, 250#, 200, 50, 150
i = ActiveSheet.Shapes.Count
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Name = "Rectangle " & i
Debug.Print "Nom : " & ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Name
ActiveSheet.Shapes.AddShape msoShapeOval, 250#, 200, 50, 150
i = ActiveSheet.Shapes.Count
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Name = "Ellipse " & i
Debug.Print "Nom : " & ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Name
Loop
Application.ScreenUpdating = True
End Sub |
Partager