Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove Excel drawings 2

Status
Not open for further replies.

barbola

Technical User
Feb 27, 2003
1,132
CA
Is there a way to remove arrows that have been drawn on a spreadsheet all at the same time - I mean there are about 11,000 of them.

thanks

Thanks!
Barb E.
 
This will clear all lines and arrows in a worksheet:

For Each sp In ActiveSheet.Shapes
With sp
Select Case .Type
Case msoLine
.Delete
Case Else
End Select
End With
Next



Blue [dragon]

If I wasn't Blue, I would just be a Dragon...
 
Got to give you one too, I made it with your help :)



Blue [dragon]

If I wasn't Blue, I would just be a Dragon...
 
Good tip, but he asked to delete ONLY ARROW objects.

Actually BLUE's code deleted LINE objects.

To delete ONLY ARROWS...
Code:
    For Each sh In ActiveSheet.Shapes
        With sh
            If .Type = msoLine Then
                With .DrawingObject
                    Select Case .ArrowHeadStyle
                        Case Is > 0     'line with arrowhead
                            sh.Delete
                        Case Else       'just a line
                    
                    End Select
                End With
            End If
        End With
    Next
:)

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884

Skip,
 
Thanks for all the tips. I'm a "she" and I don't know how to use VBA in Excel?

Barb.

Thanks!
Barb E.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top