Steve,
Your code didn't error here but then the result for zip 95670 probably isn't giving you what you want. It seems that you want to show the appropriate Site if any of the other zips are selected and if 95670 is selected then you want to show a list of sites. Correct?
See attached and:
Option Explicit
Private Sub Document_ContentControlOnEnter(ByVal oCC As ContentControl)
Select Case oCC.Title
Case "Site": DefineSite
End Select
lbl_Exit:
Exit Sub
End Sub
Private Sub Document_ContentControlOnExit(ByVal oCC As ContentControl, Cancel As Boolean)
Select Case oCC.Title
Case "Zip"
If oCC.ShowingPlaceholderText = True Then
ActiveDocument.SelectContentControlsByTag("Site").Item(1).Range.Text = ""
MsgBox "Select the zip code!"
oCC.Range.Select
Else
DefineSite
End If
End Select
End Sub
Sub DefineSite()
Dim oCC As ContentControl
Dim lngIndex As Long
Set oCC = ActiveDocument.SelectContentControlsByTag("Site").Item(1)
With oCC
.SetPlaceholderText , , "Service Center"
Select Case ActiveDocument.SelectContentControlsByTag("Zip").Item(1).Range.Text
Case 95815, 95833, 95834
.Type = wdContentControlText
.Range.Text = "123 Center"
Case 95615, 95690, 95818, 95822, 95831, 95832
.Type = wdContentControlText
.Range.Text = "ABC Center"
Case 95823, 95828, 95829
.Type = wdContentControlText
.Range.Text = "XYZ Center"
Case 95670
.Type = wdContentControlComboBox
For lngIndex = .DropdownListEntries.Count To 2 Step -1
.DropdownListEntries.Item(lngIndex).Delete
Next lngIndex
.SetPlaceholderText , , "Select or enter service center"
.DropdownListEntries.Add "XYZ Center", "XYZ Center", 2
.DropdownListEntries.Add "ABC Center", "ABC Center", 3
.DropdownListEntries.Add "123 Center", "123 Center", 4
.DropdownListEntries.Item(1).Select
Case Else
oCC.Range.Text = vbNullString
End Select
End With
lbl_Exit:
Exit Sub
End Sub
Toggle CC type.docm