Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default 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!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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!





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default 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!
Reply
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
Copy and move check box (check boxes) with new cell link? Marty Excel Worksheet Functions 1 January 20th 10 07:43 PM
How do I increase the size of check in check boxes Adams, Les Excel Discussion (Misc queries) 0 September 19th 06 02:35 PM
Enable check box in protected sheet + group check boxes Dexxterr Excel Discussion (Misc queries) 4 August 2nd 06 12:00 PM
How do i create a value for check boxes or option boxes Tim wr Excel Discussion (Misc queries) 1 February 9th 06 10:29 PM
Problem Deleting Check Boxes created from Forms Toolbar Suzan Excel Discussion (Misc queries) 4 September 15th 05 06:30 PM


All times are GMT +1. The time now is 06:52 PM.

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"