T.
Received and thank you.
I was intending to come back and update this thread this evening anyway. It worked but you just got lucky. The way dropdown DisplayName and Value work is that entries in each side of the list must be unique. So where:
TeamA 50
TeamB 60
TeamC 70
works ....
TeamA 50
TeamB 60
TeamC 50
won't.
To get around that limitation, create your list like this:
TeamA 1|50
TeamB 2|60
TeamC 3|50
and revise your code as follows:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim lngIndex As Long
Dim arrParts() As String
Dim oCC As ContentControl
Select Case ContentControl.Title
Case "Team Name"
For lngIndex = 1 To ContentControl.DropdownListEntries.Count
If ContentControl.Range.Text = ContentControl.DropdownListEntries(lngIndex).Text Then
Set oCC = ActiveDocument.SelectContentControlsByTitle("Team Fee").Item(1)
arrParts = Split(ContentControl.DropdownListEntries(lngIndex).Value, "|")
oCC.Range.Text = arrParts(1)
ActiveDocument.SelectContentControlsByTitle("Discount").Item(1).Range.Text = oCC.Range.Text - 15
Exit For
End If
Next lngIndex
End Select
lbl_Exit:
Exit Sub
End Sub