Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

Form Dropdown box with "Other" option

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karol Brown - 28 Mar 2005 18:36 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.