drop down form fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way I can have a user select an option in a drop down menu, and
have that selection change the results in other fields to predetermined
values?
 
Yes. You can do it with a macro that runs on exit from the formfield.

Here is an example that sets the value of a table cell range based on the
result in a formfield. You can easily adapt it to set the value of another
formfield:

Sub EvaluateFormFieldContent()
'
ActiveDocument.Unprotect
With ActiveDocument
If .FormFields("MartialStatus").Result = "Yes" Then
.Tables(1).Cell(1, 3).Range = "Skip to step 8"
Else
.Tables(1).Cell(1, 3).Range = "Skip to step 13"
End If
End With
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
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

Back
Top