View Single Post
 
Old 04-03-2019, 01:05 PM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

You are making this much more difficult than in needs to b Gordon.

Code:
Private Sub Document_ContentControlOnExit(ByVal CC As ContentControl, Cancel As Boolean)
Dim lngIndex As Long
  With CC
    Select Case .Title
      Case "condition"
        For lngIndex = 1 To .DropdownListEntries.Count
          If .DropdownListEntries(lngIndex).Text = .Range.Text Then
            ActiveDocument.SelectContentControlsByTitle("conditionFR").Item(1).Range.Text = .DropdownListEntries(lngIndex).Value
            Exit For
          End If
        Next lngIndex
      Case "location"
        For lngIndex = 1 To .DropdownListEntries.Count
          If .DropdownListEntries(lngIndex).Text = .Range.Text Then
            ActiveDocument.SelectContentControlsByTitle("locationFR").Item(1).Range.Text = .DropdownListEntries(lngIndex).Value
            Exit For
          End If
        Next lngIndex
      Case "The next one"
    End Select
  End With
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote