LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default delete drawings in a centain selection

On 26 okt, 11:46, Ken Johnson wrote:
On Oct 26, 6:58 pm, bartman1980 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 ActiveSheet.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!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete a selection flirtacious Charts and Charting in Excel 2 November 25th 07 01:57 PM
Problem of selection.delete Radhakrishna k.v.n.r[_2_] Excel Worksheet Functions 7 October 27th 07 11:50 AM
delete drwaings in a centain selection bartman1980 Excel Programming 1 October 26th 07 01:53 PM
Copy Selection - Paste Selection - Delete Selection Uninvisible Excel Programming 2 October 25th 07 01:31 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM


All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"