![]() |
Deleting check boxes
Greetings,
I need to delete a number of check boxes which i copied over from an HTML document into Excel. I have the code: Sub DelAllCb() Dim shp As Shape For Each shp In ActiveSheet.Shapes If shp.FormControlType = xlCheckBox Then shp.Delete End If Next shp End Sub But this does not work, is it the format of the check box below? =EMBED("Forms.HTML:Checkbox.1","") Please heeellp!! Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Deleting check boxes
See what you get with this
Dim obj as OleObject for each obj in ActiveSheet.OleObjects msgbox typename(obj.object) Next That will perhaps give you something you can use to identify which are the checkboxes you want to delete. -- Regards, Tom Ogilvy "Tempy" wrote in message ... Greetings, I need to delete a number of check boxes which i copied over from an HTML document into Excel. I have the code: Sub DelAllCb() Dim shp As Shape For Each shp In ActiveSheet.Shapes If shp.FormControlType = xlCheckBox Then shp.Delete End If Next shp End Sub But this does not work, is it the format of the check box below? =EMBED("Forms.HTML:Checkbox.1","") Please heeellp!! Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Deleting check boxes
Try this...
Sub del_check() For Each chk In ActiveSheet.CheckBoxes chk.Delete Next End Sub Tempy wrote: Greetings, I need to delete a number of check boxes which i copied over from an HTML document into Excel. I have the code: Sub DelAllCb() Dim shp As Shape For Each shp In ActiveSheet.Shapes If shp.FormControlType = xlCheckBox Then shp.Delete End If Next shp End Sub But this does not work, is it the format of the check box below? =EMBED("Forms.HTML:Checkbox.1","") Please heeellp!! Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Deleting check boxes
Hi Thom,
Could you help me with the full code please, i have treid and cannot get it to work. Thanks for your time tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Deleting check boxes
sub tester1()
Dim obj as OleObject for each obj in ActiveSheet.OleObjects msgbox typename(obj.object) Next End Sub -- Regards, Tom Ogilvy "Tempy" wrote in message ... Hi Thom, Could you help me with the full code please, i have treid and cannot get it to work. Thanks for your time tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Deleting check boxes
Hi Tom,
Thank you, please excuse my ignorance but what delets the object ? As you probably realise i am new to this game. Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
All times are GMT +1. The time now is 09:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com