Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mapping based on the drop down selection
Hi;
I have a drop down list for the user to select the "country" in my form now. Appreciate if someone could advice me on how to get the following done: a) The word "Passport" to be appeared automatically in 1 of the coumn in my table when I select a country called "Singapore" b) The word "Health Plan" to be appered in the same column when I select a country called "UK" As a result of that, different wording needs to be appered automatically when I select different country and etc Please advice. Thanks |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mapping based on the drop down selection
You would have to run a macro on exit from the dropdown form field and you
would need text form field(s) where you want to display the information eg Sub OnExitDD1() 'fills text field based on content of _ dropdown field Dim oFld As FormFields Set oFld = ActiveDocument.FormFields Select Case oFld("Dropdown1").Result Case Is = "Singapore" oFld("Text1").Result = "Passport" Case Is = "UK" oFld("Text1").Result = "Health Plan" Case Else 'Do nothing End Select End Sub Create a statement for each entry in your list eg Case Is = "Singapore" oFld("Text1").Result = "Passport" http://www.gmayor.com/installing_macro.htm Note that a dropdown field will only hold 25 entries. If you need more then you would have to consider instead the use of listboxes in userforms Word MVP FAQ - Userforms http://word.mvps.org/FAQs/Userforms.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "ah" wrote in message ... Hi; I have a drop down list for the user to select the "country" in my form now. Appreciate if someone could advice me on how to get the following done: a) The word "Passport" to be appeared automatically in 1 of the coumn in my table when I select a country called "Singapore" b) The word "Health Plan" to be appered in the same column when I select a country called "UK" As a result of that, different wording needs to be appered automatically when I select different country and etc Please advice. Thanks |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mapping based on the drop down selection
Hi;
Thanks for your help. It managed to display the default wording based on the country that I select now. However, it allows the users to change and overwrite the default value as it is a text field. I understand that I could untick the "fill in enabled" option to block this, but there are some contries that I want the user to key in their value manually into the same field. Please advice whether I could add the "Fill in enabled" coding into the macro to allow the user to overwrite the default value when they select a country called "Singapore", and disallow them from overwrite the value when they select a country called "UK". Please advice. "Graham Mayor" wrote: You would have to run a macro on exit from the dropdown form field and you would need text form field(s) where you want to display the information eg Sub OnExitDD1() 'fills text field based on content of _ dropdown field Dim oFld As FormFields Set oFld = ActiveDocument.FormFields Select Case oFld("Dropdown1").Result Case Is = "Singapore" oFld("Text1").Result = "Passport" Case Is = "UK" oFld("Text1").Result = "Health Plan" Case Else 'Do nothing End Select End Sub Create a statement for each entry in your list eg Case Is = "Singapore" oFld("Text1").Result = "Passport" http://www.gmayor.com/installing_macro.htm Note that a dropdown field will only hold 25 entries. If you need more then you would have to consider instead the use of listboxes in userforms Word MVP FAQ - Userforms http://word.mvps.org/FAQs/Userforms.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "ah" wrote in message ... Hi; I have a drop down list for the user to select the "country" in my form now. Appreciate if someone could advice me on how to get the following done: a) The word "Passport" to be appeared automatically in 1 of the coumn in my table when I select a country called "Singapore" b) The word "Health Plan" to be appered in the same column when I select a country called "UK" As a result of that, different wording needs to be appered automatically when I select different country and etc Please advice. Thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto completion based on selection of Drop down menu item (Word) | Tables | |||
Insert text based on userform selection | New Users | |||
change color of cell based upon form drop down selection | Tables | |||
Hide a row in a table based upon a previous selection | Tables | |||
define a style based on a selection | Microsoft Word Help |