Solved: ActiveX Checkbox

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

rayd7024

Thread Starter
Joined
Nov 22, 2011
Messages
3
I inserted an ActiveX checkbox into a Word 2007 document. I accepted the default name of CheckBox1 for the check box. I created a macro to set the checkbox value to false as follows:
Sub SetCheckBox()
ActiveDocument.FormFields.Item("CheckBox1").CheckBox.Value = False
End Sub

When I run the macro, I get the following error:
Run-time error '5941': The requested member of the collection does not exist.

Can anyone shed some light on the problem and possible solution.
Any and help will be greatly appreciated.
 
Joined
Sep 4, 2003
Messages
4,916
Try using the .InlineShapes collection instead. Just replace the number 1 with the index number of your actual control.

Code:
ActiveDocument.InlineShapes(1).OLEFormat.Object.Value = False
Rollin
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top