Is it possible to add text to an 'other' field in a drop down

D

Detamstance

Am creating a document with drop downs which have an 'other' choice. It is
possible to add text to the 'other' field?
 
S

Suzanne S. Barnhill

No. This requires a combo box, which is not available as a form field.
 
G

Graham Mayor

To qualify Suzanne's reply - it is not possible without a macro. At its
simplest, the following will allow you to enter text if the choice is Other
(other, or OTHER)

Sub EnterYourOwn()
Dim oFld As FormFields
Set oFld = ActiveDocument.FormFields
Select Case UCase(oFld("Dropdown1").Result)
Case Is = "OTHER"
start:
sText = InputBox("Enter the text for this field")
If sText = "" Then
MsgBox "This field may not be left blank"
GoTo start:
End If
oFld("Dropdown1").Result = sText
Case Else
'Do nothing
End Select
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top