Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Cell entry based on selection in dropdown list
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. |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Cell entry based on selection in dropdown list
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(Co mpany).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 "jcachat" wrote in message ... 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. |
#3
Posted to microsoft.public.word.tables
|
|||
|
|||
Cell entry based on selection in dropdown list
Thanks for your help Doug. This will get me started.
"Doug Robbins - Word MVP" wrote: 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(Co mpany).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 "jcachat" wrote in message ... 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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
dropdown field with optional text entry | Microsoft Word Help | |||
Auto-fill text multiple times based on initial entry - possible? | Microsoft Word Help | |||
How do I create a dropdown list in word which is link to excel? | Microsoft Word Help | |||
Help need with numbered styles | Microsoft Word Help | |||
Formatting an AutoText list field in a table cell | Tables |