Marking Checkbox from VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a range of cells ("B20:L20") all containing a checkbox. These
can be checked/un-checked from excel and then evaluated in VBA code.
But I would like to check/un-check them from inside the VBA code...

Is it possible to check/un-check a checkbox from VBA code?

/konpego
 
If it is a forms checkbox, then

activesheet.checkboxes("Check Box 1").Value = false (or True)

If it is a controls toolbox checkbox, then

activesheet.oleobjects("CheckBox1").object.value=false (or True)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Assuming your CheckBox is called CheckBox1, use

Checkbox1 = True
Checkbox1 = False

To change the status if the CheckBox.

Of course if your checkboxes are different names, then substitute those for
Checkbox1!


Neil


www.nwarwick.co.uk
 

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