Shapes

After downloading web sites to workbooks I found it necessary to remove the shapes from internet. Listing the shapes was the first step.

VBA Fifth Dimension Macro-List Shapes

Review the following code, copy it to Excel and execute it.

Sub LIST_SHAPES()
    Dim STATS(500, 5)
    Set myDocument = _
    ActiveWorkbook.Worksheets(ActiveSheet.NAME)
    With myDocument.Shapes
    NUMSHAPES = .Count
    If NUMSHAPES > 0 Then
       For II = 1 To NUMSHAPES
           STATS(II, 1) = ActiveWorkbook.NAME
           STATS(II, 2) = ActiveSheet.NAME
           STATS(II, 3) = NUMSHAPES
           STATS(II, 4) = .Item(II).Type
           STATS(II, 5) = .Item(II).NAME
       Next
       Workbooks.Add
       For II = 1 To NUMSHAPES
           Cells(II, 1) = STATS(II, 1)
           Cells(II, 2) = STATS(II, 2)
           Cells(II, 3) = STATS(II, 3)
           Cells(II, 4) = STATS(II, 4)
           Cells(II, 5) = STATS(II, 5)
       Next
    End If
End With
End Sub