View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Clear certain checkboxes

Select the textbox you want to name. (I just rightclick on it.)
Type the new name in the namebox -- to the left of the formulabar.

Type the new name and hit enter.

Then you could use:

activesheet.checkboxes("myCheckbox99").value = xloff
activesheet.checkboxes("CBX_SendEmail").value = xloff
activesheet.checkboxes("CBX_Whateveryouwant").valu e = xloff

(Remember that these are the checkboxes from the Forms toolbar -- not checkboxes
from the control toolbox toolbar -- but that matches your original code.)

Arlen wrote:

Dave,

Can I name just these 5 specific checkboxes through the Format Control menu?
If I can, then what does the macro look like which identifies the names of
those 5...

"Dave Peterson" wrote:

If you know the names of the checkboxes, you could loop through all of them
looking for a match by name.

If you know the location/range of the checkboxes to be cleared, you could loop
through all of them and compare the .topleftcell of that checkbox with the
range.

How do you know which ones to clear?

Arlen wrote:

Is there a way to identify and clear only a certain subset of checkboxes on a
worksheet?

I've got the ActiveSheet.checkboxes.value = xlOff, but of course, that
clears all checkboxes.

So...just wanting to know.

Thank you for your time.


--

Dave Peterson
.


--

Dave Peterson