Setting check box

J

John

Hi

I have placed several check boxes in my word doc. How can I check or uncheck
these using vba code?

Thanks

Regards
 
P

Peter Hewett

Hi John

You don't specifically state it, but I assume you're using FormFields (inserted using the
Forms toolbar) and not ActiveX controls ((inserted using the Control Toolbox toolbar).
Here's how to set and clear a CheckBox FormField:

ActiveDocument.FormFields("Check1").CheckBox.Value = True
ActiveDocument.FormFields("Check1").CheckBox.Value = False

HTH + Cheers - Peter
 

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