Newbie Shapes Question

  • Thread starter Thread starter Keith Wilby
  • Start date Start date
K

Keith Wilby

I have a spreadsheet with checkboxes (shapes) which I can refer to in code
using (for example)

ActiveSheet.Shapes("Check Box 19")

Can I derive the checkbox's state (true/false) using code or is it just a
dumb shape?

Thanks.

Keith.
 
Keith,

You could link a cell to the checkbox and check the value of that cell
instead. You can do that by right-clicking on the checkbox then click on
"Format Control". Go to the Control tab and specify a cell in the cell-link
field.

If you don't want to link the checkbox to a cell, you can also get the value
of the CheckBox by using either one of the following:

ActiveSheet.CheckBoxes("Check Box 19").value

or

ActiveSheet.Shapes("Check Box 19").OleFormat.Object.Value
 
Vergel Adriano said:
Keith,

You could link a cell to the checkbox and check the value of that cell
instead. You can do that by right-clicking on the checkbox then click on
"Format Control". Go to the Control tab and specify a cell in the
cell-link
field.

If you don't want to link the checkbox to a cell, you can also get the
value
of the CheckBox by using either one of the following:

ActiveSheet.CheckBoxes("Check Box 19").value

or

ActiveSheet.Shapes("Check Box 19").OleFormat.Object.Value

It certainly does, many thanks indeed.

Regards,
Keith.
 

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

Back
Top