A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Microsoft Word field and Drop Down box question



 
 
Thread Tools Display Modes
  #1  
Old April 17th, 2007, 04:08 PM posted to microsoft.public.word.tables
ANDREA
external usenet poster
 
Posts: 273
Default Microsoft Word field and Drop Down box question

I would like to activate a drop down box in a field when the field prior has
a specific result. In other words

if prev field = a then use drop down box a
if prev field = b then use drop down box b

etc.

any tips how I can do this in Microsoft Word
  #2  
Old April 17th, 2007, 04:31 PM posted to microsoft.public.word.tables
Greg Maxey
external usenet poster
 
Posts: 259
Default Microsoft Word field and Drop Down box question

It might be better to change the contents of the dropdown based on the
previous selection. Run a macro something like this on exit from the
first field:

Sub OnExitText1()
Dim oFF As FormFields
Set oFF = ActiveDocument.FormFields
Select Case oFF("Text1").Result
Case Is = "a"
With oFF("DropDown1").DropDown.ListEntries
.Clear
.Add "Apple"
.Add "Peach"
.Add "Pear"
End With
Case Is = "b"
With oFF("DropDown1").DropDown.ListEntries
.Clear
.Add "Corn"
.Add "Beans"
.Add "Rice"
End With
Case Else
oFF("DropDown1").DropDown.ListEntries.Clear
End Select
End Sub


On Apr 17, 11:08 am, Andrea wrote:
I would like to activate a drop down box in a field when the field prior has
a specific result. In other words

if prev field = a then use drop down box a
if prev field = b then use drop down box b

etc.

any tips how I can do this in Microsoft Word



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.