Frosty,

I agree with your logical construct argument. Cleaning up the code and making it more logical (which I am sure will also serve to further my understanding) is a project for another day.

You were correct about using Greg's SelectContentControlsByTag method. I have now been able to get the document to do everything I need it to do. The final code is below.

I know it is ugly (formatting wise). As a point of convention do you use tabs or spaces to indent different lines?



[VBA]Private Sub Document_ContentControlOnExit(ByVal CC As ContentControl, Cancel As Boolean)
Dim oRng As Word.Range
Dim oVoteAuth As Boolean
Dim oCC_Target As ContentControl
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect Password:="12345"
End If
Select Case CC.Tag

Case "longname1"
If fnc_InInvalidLong(CC) Then
Cancel = True
'CC.Range.Select
End If

'remove highlighting from longname2 and longname3 if text entered in longname1
If CC.ShowingPlaceholderText = False Then
Set oCC_Target = ActiveDocument.SelectContentControlsByTag("longname2").Item(1)
With oCC_Target
With .Range
.Shading.BackgroundPatternColor = wdColorWhite
End With
End With

Set oCC_Target = ActiveDocument.SelectContentControlsByTag("longname3").Item(1)
With oCC_Target
With .Range
.Shading.BackgroundPatternColor = wdColorWhite
End With
End With
End If

'highlight longname2 and longname3 only if longname1 is cleared AND longname2 and longname3 are cleared
If CC.ShowingPlaceholderText = True Then
Set oCC_Target = ActiveDocument.SelectContentControlsByTag("longname2").Item(1)
If oCC_Target.ShowingPlaceholderText = True Then
With oCC_Target
With .Range
.Shading.BackgroundPatternColor = wdColorRose
End With
End With
End If

Set oCC_Target = ActiveDocument.SelectContentControlsByTag("longname3").Item(1)
If oCC_Target.ShowingPlaceholderText = True Then
With oCC_Target
With .Range
.Shading.BackgroundPatternColor = wdColorRose
End With
End With
End If
End If

Case "longname2", "longname3"
If fnc_InInvalidLong(CC) Then
Cancel = True
'CC.Range.Select
End If

Case "shortname"
If fnc_InInvalidShort(CC) Then
Cancel = True
'CC.Range.Select
End If
Case "voteauth"
'This is the CC that you are going to manipulate while processing the special case CC
'P.S. it would be nice if you used distintive titles and tabs (e.g., Voting Authority)
Set oCC_Target = ActiveDocument.SelectContentControlsByTag("voteauthin").Item(1)
If CC.Range.Text = "Jerry Lewis" Then
'You really don't even want the CC to show. To bad there isn't a CC.Visible property.
With oCC_Target
.LockContents = False
With .Range
.Text = " " 'So it isn't showing placeholder text
.Shading.BackgroundPatternColor = wdColorAutomatic
End With
'To deal with the shmucks.
.LockContents = True
End With
'Move to the next CC of interest
ActiveDocument.SelectContentControlsByTag("acmtype").Item(1).Range.Select
Else
With oCC_Target
.LockContents = False
With .Range
.Text = ""
.Shading.BackgroundPatternColor = wdColorRose
End With
End With
End If
End Select
'Why when leaving "longname1, 2, 3, or short name does the backgroud color change?
'Because we are now out of the Select Case statement that evaluated them specifically and are now evaluating them
'generally:
If CC.ShowingPlaceholderText = False Then
'Deal with "voteauthin"
If CC.LockContents = True Then
'Don't try to change it.
Else
CC.Range.Shading.BackgroundPatternColor = wdColorAutomatic
End If
Else

Select Case CC.Tag

Case "Date1", "Date2", "Date3"
CC.Range.Shading.BackgroundPatternColor = wdColorWhite

'keep longname2 and longname3 from rehighlighting if they are blank but longname1 has something entered
Case "longname2", "longname3"
If CC.ShowingPlaceholderText = False Then
CC.Range.Shading.BackgroundPatternColor = wdColorWhite
Else
Set oCC_Target = ActiveDocument.SelectContentControlsByTag("longname1").Item(1)
If oCC_Target.ShowingPlaceholderText = False Then
CC.Range.Shading.BackgroundPatternColor = wdColorWhite
Else
CC.Range.Shading.BackgroundPatternColor = wdColorRose
End If
End If

Case Else
CC.Range.Shading.BackgroundPatternColor = wdColorRose
End Select
End If
End Sub[/VBA]