Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Search Search
Search for:
Tech Support Guy > > >

Word 2010


(!)

rayd7024's Avatar
rayd7024 rayd7024 is offline
Junior Member with 3 posts.
THREAD STARTER
 
Join Date: Nov 2011
08-Dec-2011, 09:33 AM #1
Word 2010
I have a Word 2010 document that contains three several ActiveX checkboxes. The checkbox names are CheckBox1 through CheckBox3. How do I set the Value of the checkboxes?

I've tried the following however, it doesn't work.

Sub ClearCheckBoxes()
Dim numCheckBoxes
numCheckBoxes = 3
Dim chkBoxNum As Integer
chkBoxNum = 3
Dim chkBoxString As String
Const constString = "CheckBox"
For cnt = 1 To numCheckBoxes
chkBoxString = constString & cnt
ActiveDocument.FormFields.Item(chkBoxString).CheckBox.Value = False
chkBoxString = ""
Next cnt
End Sub


The macro that followw works; however, it comes with some baggage. If I delete one of the check boxes, the index changes and the macro no longer works.

Sub ClearActiveX()
Dim num As Integer
num = 3
For cnt = 1 To num
ActiveDocument.InlineShapes(cnt).OLEFormat.Object = False
Next cnt
End Sub


I'd really like to use the Sub ClearCheckBoxes() macro above, but can't figure out how to make it work.

Any and all help will be greatly appreciated.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
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.


Tags
activex control, macro, word 2010

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑