Run Macro on form after exiting text box

N

Nigel

I am new to word and Macros so this more than likely easy

I have a form with some check and text boxes on it

if a user checks a check box and then later on enters a value in a text
field I want it to check the check boxs and see if it is true, if so I want a
value from another text box entered into other text boxes. i tried this but
no luck

If check4 = True Then
text15 = text11
text18 = text11
End If

thanks
 
J

Jean-Guy Marcil

Nigel was telling us:
Nigel nous racontait que :
I am new to word and Macros so this more than likely easy

I have a form with some check and text boxes on it

if a user checks a check box and then later on enters a value in a
text field I want it to check the check boxs and see if it is true,
if so I want a value from another text box entered into other text
boxes. i tried this but no luck

If check4 = True Then
text15 = text11
text18 = text11
End If

Try something like:

With ActiveDocument.FormFields
If .Item("check4").CheckBox.Value = True Then
.Item("text15").Result = .Item("text11").Result
.Item("text18").Result = .Item("text11").Result
End If
End With

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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