![]() |
#2
|
||||
|
||||
![]()
Hi Ikks,
Dropdown formfields don’t support text entry. To provide that facility, you could provide an option in the dropdown for 'free text' and use an on-exit macro with an Inputbox to insert the user’s 'free text' into the dropdown. For example, suppose you have a dropdown with 5 items, the last of which offers free text entry (e.g. an 'Other' option). Adding the following on-exit macro to the formfield will provide that: Code:
Sub FreeText() Dim StrNew As String, i As Long With Selection.FormFields(1).DropDown i = .ListEntries.Count If .Value = i Then StrNew = Trim(InputBox("Input your text", "Data Entry", .ListEntries(i).Name)) If StrNew = vbNullString Then Exit Sub .ListEntries(i).Delete .ListEntries.Add StrNew .Value = i End If End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
drop-down list unlock |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
click4akshay | Excel | 2 | 04-28-2011 01:51 PM |
Adding a country drop-down list | iyavor | Word | 0 | 10-27-2010 03:51 AM |
Create Drop Down List Box | hbradshaw | Word VBA | 0 | 09-27-2010 06:24 AM |
Drop Down List and Functions (Linking) | sten | Excel | 0 | 03-17-2010 03:03 PM |
Long List for drop down box | DLo99 | Word | 0 | 02-28-2010 08:07 AM |