make form automation recognize the boolean state of a check box

D

deaf toddy

When automating a form, it would be helpful if I could make the exit macro of
a check box dependent on the boolean state of that check box. It would be
even better if I could enter a command such as "if check1=1 then
check2=enabled" or something similar. The current method of using macros is
cumbersome in many situations.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...831509d7&dg=microsoft.public.word.vba.general
 
G

Greg Maxey

deaf,

Do you mean something like:

Sub RunOnExitCheck1()

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

End Sub
 

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