View Single Post
 
Old 08-08-2018, 08:13 AM
PointCheck PointCheck is offline Windows 10 Office 2016
Novice
 
Join Date: Aug 2018
Posts: 3
PointCheck is on a distinguished road
Default Reply

I put the example in my form. When I add new dropdown boxes and select the example I get am error in the code (Orange section). Can you assist?

Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long, StrDetails As String
With ContentControl
If .Title = "MBACRegion" Then
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
StrDetails = Replace(.DropdownListEntries(i).Value, "|", Chr(11))
Exit For
End If
Next
ActiveDocument.ContentControls(2).Range.Text = StrDetails
End If
End With
End Sub
Reply With Quote