Access Grouped Worksheet Checkbox (Forms type) Or Get Parent Class

F

formido

Hi,

I'm trying to create a sort of palette of checkboxes in an worksheet.
However, if you group controls, apparently you can't link checkbox
state to a cell anymore. So, I was hoping to get its state
programmatically. However, I can't figure out how to access it. If I
select the checkbox and run a TypeName on it, I get back 'checkbox12'.
How can I use this to access that checkbox? I can't figure out what
it's a member of. Incidentally, how can I programmatically determine
what a selected object's parent is?

Michael Terry
 
C

Chay Harley

You can, you need to bring up the properties of the checkbox, and put the
Cell entry into the field named "LinkedCell".

ie. I put in A1

Now, when I change the state of the checkbox, the cell changes from TRUE to
FALSE and back again.

If you obtain the value of the linked cell, you can see what is what. Oh,
and you should also change the name of the checkbox object in the
properties, something like 'chkLights' or 'chkGasOff' if you were using it
as a checklist before you go on holiday.
That way, you can say in vba (untested) : if activesheet.chkLights.value =
false then....

HTH,

Chay Harley.
 
F

formido

Hi,

I'm trying to create a sort of palette of checkboxes in an worksheet.
However, if you group controls, apparently you can't link checkbox
state to a cell anymore. So, I was hoping to get its state
programmatically. However, I can't figure out how to access it. If I
select the checkbox and run a TypeName on it, I get back 'checkbox12'.
How can I use this to access that checkbox? I can't figure out what
it's a member of. Incidentally, how can I programmatically determine
what a selected object's parent is?

Michael Terry

Oh, just set it myself by attaching a macro to the button. Got it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top