Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Removing Checkboxes Programmatically

Does anyone know how to remove checkboxes programmatically? These
checkboxes were added programmatically using the
"ActiveSheet.Checkboxes.Add..." syntax. Unfortunately
"ActiveSheet.Checkboxes.Remove..." generates a snytax error.

Someone in this newsgroup advised me of the Checkboxes.Add method, but I'm
unable to find any information on methods of adding or removing userform
controls in on-line help or from any other source. Are there some decent
sources of information that anyone knows of?

Thanks,
Mark D.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Removing Checkboxes Programmatically

Hi Mark:

ActiveSheet.CheckBoxes.Delete

will remove all checkboxes on the sheet.

Regards,

Vasant.

"Mark D'Agosta" wrote in message
et...
Does anyone know how to remove checkboxes programmatically? These
checkboxes were added programmatically using the
"ActiveSheet.Checkboxes.Add..." syntax. Unfortunately
"ActiveSheet.Checkboxes.Remove..." generates a snytax error.

Someone in this newsgroup advised me of the Checkboxes.Add method, but I'm
unable to find any information on methods of adding or removing userform
controls in on-line help or from any other source. Are there some

decent
sources of information that anyone knows of?

Thanks,
Mark D.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Removing Checkboxes Programmatically

Activesheet.Checkboxes.Delete

removes them all

Dim i as Long
Dim cbox as checkbox
i = 0
for each cbox in Activesheet.Checkboxes
i = i + 1
if i mod 2 = 0 then
cbox.delete
end if
Next

will delete every other one (as an example).

--
Regards,
Tom Ogilvy

Mark D'Agosta wrote in message
et...
Does anyone know how to remove checkboxes programmatically? These
checkboxes were added programmatically using the
"ActiveSheet.Checkboxes.Add..." syntax. Unfortunately
"ActiveSheet.Checkboxes.Remove..." generates a snytax error.

Someone in this newsgroup advised me of the Checkboxes.Add method, but I'm
unable to find any information on methods of adding or removing userform
controls in on-line help or from any other source. Are there some

decent
sources of information that anyone knows of?

Thanks,
Mark D.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Removing Checkboxes Programmatically

Thanks for the info on the Checkboxes.Delete method. It works just fine.
As to the second part of my question, where is this stuff documented? The
"Checkboxes" collection does not appear in the member autolist for the
worksheet object; it does not appear in the object browser under the
worksheet object; it's not in the VBA on-line help. Any ideas?

Thanks,
Mark D.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Removing Checkboxes Programmatically

The controls are from xl5/xl95 and are maintained for consistency. Get a
copy of xl5 or xl95 and look at the help file and object browser for
documentation. You can go to the object browser and right click in a blank
area and select show hidden members and you will see the properties and
methods for the checkbox object and checkboxes collection.

I can send you a large word document that contains some good documentation
on them in the context of dialog sheets, but it pretty much equally
applicable to their use on worksheets. Contact me if you want me to send it
to you. The email I am using is a good email. Provide me with a good email
to sent it to.

--
Regards,
Tom Ogilvy


"Mark D'Agosta" wrote in message
t...
Thanks for the info on the Checkboxes.Delete method. It works just fine.
As to the second part of my question, where is this stuff documented? The
"Checkboxes" collection does not appear in the member autolist for the
worksheet object; it does not appear in the object browser under the
worksheet object; it's not in the VBA on-line help. Any ideas?

Thanks,
Mark D.




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
Querying Properties programmatically BizMark Excel Discussion (Misc queries) 0 June 19th 06 04:17 PM
Adding Checkboxes Programmatically Mark D'Agosta Excel Programming 1 October 8th 03 03:20 AM
Programmatically Add Reference` keepitcool Excel Programming 1 September 16th 03 05:30 PM
Programmatically Add Reference` Jean-Paul Viel Excel Programming 0 September 16th 03 02:23 PM
Can i set a reference programmatically? Tom Ogilvy Excel Programming 1 August 19th 03 04:24 PM


All times are GMT +1. The time now is 01:49 PM.

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

About Us

"It's about Microsoft Excel"