Cell entry based on selection in dropdown list

J

jcachat

I have a dropdown list in a cell (row 1, column1). I want to populate another
cell (row 1, column 2) in the table with different sentences based on my
selection in the dropdown list. How woul I do this. I am not a programmer but
am willing to learn.
 
D

Doug Robbins - Word MVP

If you create each sentence as an autotext entry, the name for which you
have listed in the dropdown list, you could use:

' Macro created 15-11-97 by Doug Robbins to add the address corresponding to
a drop down name
'
Dim Company as String, Address as String
Dim myDrop as DropDown

Set myDrop = ActiveDocument.FormFields("Dropdown1").DropDown
Company = myDrop.ListEntries(myDrop.Value).Name
Address = ActiveDocument.AttachedTemplate.AutoTextEntries(Company).Value
ActiveDocument.FormFields("Text1").Result = Address

There are of course other ways in which the sentences could be stored.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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