View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Jeff Kunberger[_2_] Jeff Kunberger[_2_] is offline
external usenet poster
 
Posts: 2
Default Linking dropdown boxes (box 2 list dependent on box 1 choice)

Okay,

So I add two drop down boxes to my document. Then go to the first drop down
box and input all the items to appear in that list.

Then I write the macro to look at the choice in ddb 1 and populate ddb 2
based on the choice?

The only vba code I found to do a cascading list box uses a table in a
different file. I dont' want to reference another document. I want just
input the data in the code, (ie. If Alpha, then display Apple, Alligator,
Audi; If Beta, then display Baseball, Book, Bumper..etc).

Any suggestions?
"Jay Freedman" wrote:

First write the macro that populates the second box based on the value
selected in the first box. Then open the Properties dialog of the first box
(most easily by double-clicking the box), look in the "Exit" dropdown, and
select the name of the macro you wrote. When the user tabs or mouse-clicks
out of the first box, the macro will run before the next form field gets the
focus.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Jeff Kunberger wrote:
I found two similar questions, but I still can't figure out the first
step...How to get the dropdown box1 to know to run the VBA code.

I add the ddb form field via the toolbar button, then click on the VB
Editor toolbar button...but that doesn't link anything.

I'm sure I'm missing something simple, but any help would be much
appreciated.

Jeff