Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
jcachat jcachat is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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   Report Post  
Posted to microsoft.public.word.tables
jcachat jcachat is offline
external usenet poster
 
Posts: 2
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
dropdown field with optional text entry Miranda Microsoft Word Help 2 February 18th 06 10:43 AM
Auto-fill text multiple times based on initial entry - possible? Jenna B Microsoft Word Help 2 February 16th 06 05:26 PM
How do I create a dropdown list in word which is link to excel? Bad Microsoft Word Help 1 January 25th 06 01:17 PM
Help need with numbered styles andy26 Microsoft Word Help 8 November 22nd 05 06:46 PM
Formatting an AutoText list field in a table cell mushymama Tables 2 August 8th 05 06:58 PM


All times are GMT +1. The time now is 11:39 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"