Re: delete drawings in a centain selection
- From: bartman1980 <bartman1980@xxxxxxxxxxx>
- Date: Fri, 26 Oct 2007 03:23:39 -0700
On 26 okt, 11:46, Ken Johnson <KenCJohn...@xxxxxxxxx> wrote:
On Oct 26, 6:58 pm, bartman1980 <bartman1...@xxxxxxxxxxx> wrote:
I tried to delete all the drawings in a certain selection.
sub deletedrawings()
Sheets("Resultaat").Select
Range("A60:H60").Select
Range("H60").Activate
Range(Selection, Selection.End(xlDown)).Select
activecells.DrawingObjects(1).Delete
Selection.ClearContents
end sub
But he gives an error on the line:
activecells.DrawingObjects(1).Delete
Note: searching and fine the drawing isn't an option because this is
totally random.
I just want to delete all drawings ans cells in the selection I made.
Maybe something like this...
Public Sub DeleteShpsWithTLCell_InSelection()
Dim Shp As Shape
For Each Shp In Active***.Shapes
If Not Intersect(Shp.TopLeftCell, Selection) Is Nothing Then
Shp.Delete
End If
Next Shp
End Sub
Ken Johnson- Tekst uit oorspronkelijk bericht niet weergeven -
- Tekst uit oorspronkelijk bericht weergeven -
Hi Ken,
This works perfect!
Thanks!
.
- References:
- delete drawings in a centain selection
- From: bartman1980
- Re: delete drawings in a centain selection
- From: Ken Johnson
- delete drawings in a centain selection
- Prev by Date: Re: Hierarchy Macro
- Next by Date: RE: Export to CSV file problems
- Previous by thread: Re: delete drawings in a centain selection
- Next by thread: Re: delete drawings in a centain selection
- Index(es):