![]() |
Selecting objects for deletion in 2007
I have a spreadsheet with about 600 check boxes where I need to delete about
half of them. In previous versions I could select as many objects as I chose by simply drawing a box around them to select them and hitting delete. It seems in 2007 I can either choose them all at once or one at a time, nothing inbetween. Is this nightmare scenario correct or is there a way? Squeaky |
Selecting objects for deletion in 2007
i not remember way you say delete boxs in old excels but this makro delets
check boxes in range you select first Sub DelCkBoxes() Dim Ck As CheckBox For Each Ck In ActiveSheet.CheckBoxes If Not Intersect(Ck.TopLeftCell, Selection) Is Nothing Then Ck.Delete End If Next End Sub "Squeaky" wrote in message ... |I have a spreadsheet with about 600 check boxes where I need to delete about | half of them. | | In previous versions I could select as many objects as I chose by simply | drawing a box around them to select them and hitting delete. | | It seems in 2007 I can either choose them all at once or one at a time, | nothing inbetween. Is this nightmare scenario correct or is there a way? | | Squeaky |
Selecting objects for deletion in 2007
Hi Homey.
How do I select the range? "Homey" wrote: i not remember way you say delete boxs in old excels but this makro delets check boxes in range you select first Sub DelCkBoxes() Dim Ck As CheckBox For Each Ck In ActiveSheet.CheckBoxes If Not Intersect(Ck.TopLeftCell, Selection) Is Nothing Then Ck.Delete End If Next End Sub "Squeaky" wrote in message ... |I have a spreadsheet with about 600 check boxes where I need to delete about | half of them. | | In previous versions I could select as many objects as I chose by simply | drawing a box around them to select them and hitting delete. | | It seems in 2007 I can either choose them all at once or one at a time, | nothing inbetween. Is this nightmare scenario correct or is there a way? | | Squeaky |
Selecting objects for deletion in 2007
Hi Squeaky
See http://www.rondebruin.nl/controlsobjectsworksheet.htm You can use this code example to delete all shapes Sub Shapes1() 'Delete all Objects except Comments On Error Resume Next ActiveSheet.DrawingObjects.Visible = True ActiveSheet.DrawingObjects.Delete On Error GoTo 0 End Sub Or only checkboxes from Forms ActiveSheet.CheckBoxes.Delete Or ActiveX checkboxes Sub OLEObjects3() Dim obj As OLEObject For Each obj In ActiveSheet.OLEObjects If TypeOf obj.Object Is MSForms.CheckBox Then obj.Delete End If Next End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Squeaky" wrote in message ... I have a spreadsheet with about 600 check boxes where I need to delete about half of them. In previous versions I could select as many objects as I chose by simply drawing a box around them to select them and hitting delete. It seems in 2007 I can either choose them all at once or one at a time, nothing inbetween. Is this nightmare scenario correct or is there a way? Squeaky |
Selecting objects for deletion in 2007
say you want to delete all checks in range a1 to d12. first go to cell a1.
then drag with left mouse buton down to d12 "Squeaky" wrote in message ... | Hi Homey. | | How do I select the range? | | "Homey" wrote: | | i not remember way you say delete boxs in old excels but this makro delets | check boxes in range you select first | | Sub DelCkBoxes() | Dim Ck As CheckBox | For Each Ck In ActiveSheet.CheckBoxes | If Not Intersect(Ck.TopLeftCell, Selection) Is Nothing Then | Ck.Delete | End If | Next | End Sub | | | "Squeaky" wrote in message | ... | |I have a spreadsheet with about 600 check boxes where I need to delete | about | | half of them. | | | | In previous versions I could select as many objects as I chose by simply | | drawing a box around them to select them and hitting delete. | | | | It seems in 2007 I can either choose them all at once or one at a time, | | nothing inbetween. Is this nightmare scenario correct or is there a way? | | | | Squeaky | | |
Selecting objects for deletion in 2007
i see rons code. my code is for checkbox from Forms toolbar. not work if
you used Control toolbox type check box sorry. "Squeaky" wrote in message ... | Hi Homey. | | How do I select the range? | | "Homey" wrote: | | i not remember way you say delete boxs in old excels but this makro delets | check boxes in range you select first | | Sub DelCkBoxes() | Dim Ck As CheckBox | For Each Ck In ActiveSheet.CheckBoxes | If Not Intersect(Ck.TopLeftCell, Selection) Is Nothing Then | Ck.Delete | End If | Next | End Sub | | | "Squeaky" wrote in message | ... | |I have a spreadsheet with about 600 check boxes where I need to delete | about | | half of them. | | | | In previous versions I could select as many objects as I chose by simply | | drawing a box around them to select them and hitting delete. | | | | It seems in 2007 I can either choose them all at once or one at a time, | | nothing inbetween. Is this nightmare scenario correct or is there a way? | | | | Squeaky | | |
Selecting objects for deletion in 2007
Hi Ron,
I'll give it a try. So basically the answer is MS removed the ability to group selected objects using the mouse. It's either all or one at a time. I'm not thrilled about having to introduce a macro into macro-free documents. What if i only want to select them to move a bunch of them over a bit? Squeaky. "Ron de Bruin" wrote: Hi Squeaky See http://www.rondebruin.nl/controlsobjectsworksheet.htm You can use this code example to delete all shapes Sub Shapes1() 'Delete all Objects except Comments On Error Resume Next ActiveSheet.DrawingObjects.Visible = True ActiveSheet.DrawingObjects.Delete On Error GoTo 0 End Sub Or only checkboxes from Forms ActiveSheet.CheckBoxes.Delete Or ActiveX checkboxes Sub OLEObjects3() Dim obj As OLEObject For Each obj In ActiveSheet.OLEObjects If TypeOf obj.Object Is MSForms.CheckBox Then obj.Delete End If Next End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Squeaky" wrote in message ... I have a spreadsheet with about 600 check boxes where I need to delete about half of them. In previous versions I could select as many objects as I chose by simply drawing a box around them to select them and hitting delete. It seems in 2007 I can either choose them all at once or one at a time, nothing inbetween. Is this nightmare scenario correct or is there a way? Squeaky |
Selecting objects for deletion in 2007
Manual it is not possible to select every type of shape (I not test it in SP2)
I send that bug a long time ago. As far as I know code is the only way -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Squeaky" wrote in message ... Hi Ron, I'll give it a try. So basically the answer is MS removed the ability to group selected objects using the mouse. It's either all or one at a time. I'm not thrilled about having to introduce a macro into macro-free documents. What if i only want to select them to move a bunch of them over a bit? Squeaky. "Ron de Bruin" wrote: Hi Squeaky See http://www.rondebruin.nl/controlsobjectsworksheet.htm You can use this code example to delete all shapes Sub Shapes1() 'Delete all Objects except Comments On Error Resume Next ActiveSheet.DrawingObjects.Visible = True ActiveSheet.DrawingObjects.Delete On Error GoTo 0 End Sub Or only checkboxes from Forms ActiveSheet.CheckBoxes.Delete Or ActiveX checkboxes Sub OLEObjects3() Dim obj As OLEObject For Each obj In ActiveSheet.OLEObjects If TypeOf obj.Object Is MSForms.CheckBox Then obj.Delete End If Next End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Squeaky" wrote in message ... I have a spreadsheet with about 600 check boxes where I need to delete about half of them. In previous versions I could select as many objects as I chose by simply drawing a box around them to select them and hitting delete. It seems in 2007 I can either choose them all at once or one at a time, nothing inbetween. Is this nightmare scenario correct or is there a way? Squeaky |
All times are GMT +1. The time now is 08:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com