I would like to create a drop down box in a form that provides for the most
common responses, but allows the user to also select "Other." If "other"
is selected, I would like the word "Other" NOT to appear, but to allow the
user to fill in the text in the form.
Do you know if this is possible? If possible, how do I do it?
Thanks in advance,
Karol Brown
Greg Maxey - 29 Mar 2005 05:13 GMT
Karol,
Posting this only to demonstrate that it can be done. I believe that a
userform with a combobox (designed for just this sort of thing) would be
more appropriate. Run the following as an on exit from your dropdown field
Sub ScratchMacro()
Dim myString As String
Dim oDoc As Document
Dim i As Long
'normal list has 4 items. Other being the last entry
Set oDoc = ActiveDocument
If oDoc.FormFields("Dropdown1").Result = "Other" Then
myString = InputBox("Type your selection here:")
For i = oDoc.FormFields("Dropdown1").DropDown.ListEntries.Count To 5
Step -1
oDoc.FormFields("Dropdown1").DropDown.ListEntries(i).Delete
Next
oDoc.FormFields("Dropdown1").Result = myString
End If
End Sub

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> I would like to create a drop down box in a form that provides for
> the most common responses, but allows the user to also select
[quoted text clipped - 6 lines]
>
> Karol Brown