![]() |
|
#17
|
||||
|
||||
|
Try:
Code:
Function Ddown(oDoc As Document) As Boolean
Dim oFF As FormField, i As Long, bChng As Boolean
On Error GoTo Err_Handler
For Each oFF In oDoc.FormFields
With oFF
If .Type = wdFieldFormDropDown Then
bChng = False
If .Name = "Dropdown1" Then
bChng = True
Else
For i = 1 To .DropDown.ListEntries.Count
If .DropDown.ListEntries(i).Name = "Select Vessel" Then
bChng = True
Exit For
End If
Next
End If
End If
If bChng = True Then
.Name = "drpVessel"
'With .Dropdown.ListEntries
' .Clear
' .Add "Item 1"
' .Add "Item 2"
' .Add "Item 3"
' .Add "Item 4"
'End With
Exit For
End If
End With
Next oFF
Ddown = True
lbl_Exit:
Exit Function
Err_Handler:
Ddown = False
Resume lbl_Exit
End Function
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| automatically, dropdown, replace |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Multiple entries in dropdown lists
|
paul_pearson | Word VBA | 154 | 11-08-2025 03:51 PM |
| Duplicating entries on multiple tabs automatically | jbexley | Excel | 0 | 08-28-2014 04:48 PM |
Captions automatically updating all previous entries
|
jhats | Word | 1 | 07-29-2014 11:53 PM |
| Dropdown list, Macro | shield5 | Excel Programming | 7 | 10-27-2013 01:51 AM |
| Change cell color everytime a value is selected in dropdown list | angelica_gloria | Excel | 4 | 01-27-2012 06:47 PM |