![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Location: Australia
Posts: 31
|
What's the quickest way to clear all drawing objects from a sheet, or better still the best way to clear all autoshapes and drawn objects from a particular cell range
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 363
|
The quickest way to clear all drawn object from the sheet is Click Edit > Goto > Special > Objects > OK. Then press delete.
__________________
It's never too late to learn something new. Ricky |
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
hope this helps. It is important to remember that autoshapes(correctme if i'm wrong) are not in a cell. they are seperate objects. so selecting a range wmay not be of assistance.
Please save your work b4 testing this macro. pict.type=13 should mean it wont delete other objects.. such as macro buttons. Dim Pict As Object For Each Pict In ActiveSheet.Shapes If Pict.Type = 13 Then Pict.Delete End If Next Quote:
__________________
Colin |
|
|
|
|
|
|
#4 |
|
New Member
Join Date: May 2002
Location: Australia
Posts: 31
|
Just tried that thanks Ricky, works great, but how do i just clear all objects from a selected cell range. I think that is going to be my real problem.
Any more thoughts.?? On 2002-05-09 19:45, Ricky Morris wrote: The quickest way to clear all drawn object from the sheet is Click Edit > Goto > Special > Objects > OK. Then press delete. [/quote] |
|
|
|
|
|
#5 | |
|
New Member
Join Date: May 2002
Location: Australia
Posts: 31
|
G'day again Qroozn, just sent you an e-mail a few minutes ago. My refined question mate is How do I remove/delete all drawn objects, rectangles lines circles etc from a specic cell range. Autoshapes don't matter.
See how you go with this one mate, computer arrived yet?? Cheers Coco On 2002-05-09 19:50, Qroozn wrote: hope this helps. It is important to remember that autoshapes(correctme if i'm wrong) are not in a cell. they are seperate objects. so selecting a range wmay not be of assistance. Please save your work b4 testing this macro. pict.type=13 should mean it wont delete other objects.. such as macro buttons. Dim Pict As Object For Each Pict In ActiveSheet.Shapes If Pict.Type = 13 Then Pict.Delete End If Next Quote:
|
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Posts: 363
|
Try this:
Sub del_shapes_in_selection() For Each cell In Selection For Each sh In ActiveSheet.Shapes If sh.TopLeftCell.Address = cell.Address Then sh.Delete Next Next End Sub
__________________
It's never too late to learn something new. Ricky |
|
|
|
|
|
#7 |
|
New Member
Join Date: May 2002
Location: Australia
Posts: 31
|
Brilliant Ricky, thanx a million, that's the medicine, got it Yeah!! I love this ****.
Thanks All.. Coco On 2002-05-09 20:11, Ricky Morris wrote: Try this: Sub del_shapes_in_selection() For Each cell In Selection For Each sh In ActiveSheet.Shapes If sh.TopLeftCell.Address = cell.Address Then sh.Delete Next Next End Sub [/quote] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|