How do I link drop down menus to limit options?

G

Guest

I am trying to work out how I link my drop down menus in a form so that if an
option is selected in drop down menu #1, only related options become
available in drop down menu #2.
Word is only allowing me 25 items in a drop down menu, and i require more
unless i can link menus.
 
G

Greg Maxey

You would need to run a macro on exit from DropDown1 to clear and
repopulate the list in DropDown2.

Something like this:

Sub DD1OnExit()
Dim oFF As FormFields
Set oFF = ActiveDocument.FormFields
Select Case oFF("DropDown1").Result
Case "Import"
With oFF("DropDown2").DropDown.ListEntries
.Clear
.Add "Audi"
.Add "BMW"
.Add "Mercedes"
End With
Case "Domestic"
With oFF("DropDown2").DropDown.ListEntries
.Clear
.Add "Ford"
.Add "Chevrolet"
.Add "Chrysler"
End With
Case Else
'Do Nothing
End Select
End Sub

There is a work around for the 25 entry limitation: See:
http://support.microsoft.com/?kbid=306258
 

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