CheckBox in VBA

  • Thread starter Thread starter Stephane
  • Start date Start date
S

Stephane

Hi,

I'm not able to find the right code to use correctly the checkbox.
It's not working. Here's the part of my code that is not working.

Worksheets("sheetname").Activate
ActiveSheet.OLEObjects("checkbox2").Object.Value = 1

I've tried to place those 2 lines in different places in my program
and I've also tried to change the name of the ckeckbox and I still can
not activate this checkbox.

What's the solution?????
 
try this
ActiveSheet.Shapes("CheckBox2").Select
Selection.Value = False
 
Works for me. Are you sure it is a control toolbox checkbox?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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