Check box form Feild

J

Jeffery B Paarsa

Hello

As you know we have two types of check boxs. One that is comming from
Control toolbox toolbar and another that is on Form toolbar.

My question is for the Check box that come from Froms toolbar not the other
one. This is the Check box that when you check it a cross like X will be
displayed on it. Other one "Control Toolbox" only a tick mark is shown.

Does anybody know how to set and unset this check box using VB or Macro? I
need to set this via Macro because it looks better when it is checed compare
to the check box that is comming from Control toolbox toolbar.
 
D

Doug Robbins - Word MVP

The following code will toggle the state of the checkbox formfield to which
the bookmark Check1 is assigned:

With ActiveDocument.FormFields("Check1").CheckBox
If .Value = True Then
.Value = False
Else
.Value = True
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Jeffery B Paarsa

It seems that this can only works for the checkbox created from Control field
toolbar not the checkbox created from the form field tool bar. If you
display both toolbars you will see that both of them has checkbox which they
are identical in shape. Checkbox created from Control Toolbar has properties
and you can set the value to True and False and usually when this checkbox is
checked you will see √ in it but checkbox created from form toolbar does not
have properties and when you click on it a dialog box is opend that you can
select between "checked" and "not checked". This check box when is checked
you will see a X inside the checkbox. I am trying to use the checkbox that
has been created from Form Tool bar not the one that can be created from
Control toolbar. Thanks for the response.
 
D

Doug Robbins - Word MVP

No, you have that back to front. The code works with the CheckBox type
FormField that is inserted from the toolbar that is displayed when you
select Forms from the list of toolbars under View>Toolbars

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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