Hi there,
I'm way out of my league, and need help. I need to use example #2 on the following Greg Maxey website, but with some tweaks:
Content Control Custom Events
I have a drop-down list box content control box labeled "Service" that is the master. It has 5 drop-down options. I have 4 rich text content control boxes that need to be slaved, and all are already labeled differently. If the user selects option 1-4 in the drop-down, nothing should happen to the 4 slave text content control boxes. However, if the user selects option 5 in the drop-down, then all 4 slave rich text content control boxes should have the text "N/A" appear.
I've poked around the Demonstration Package from the website above (e.g., adding to the array of linked relationships, etc.), but got stuck with no defined oCC_Linked_2 error.
Here's the snippet of the modMain module I edited to get the additional slave rich text content fields:
Code:
Dim arrLinked(7, 4) As String
Dim i As Long
Dim oDoc As Document
On Error GoTo Err_Handler
'Build array of link relationships
arrLinked(0, 0) = "Name1"
arrLinked(0, 1) = "Name2"
arrLinked(1, 0) = "Service"
arrLinked(1, 1) = "Rank"
arrLinked(1, 2) = "MOS"
arrLinked(1, 3) = "Unit"
arrLinked(1, 4) = "Commander"
Here's the snippet where I edited the OnChange directives:
Code:
Case "Service"
Select Case oCC_InEvent.Range.Text
Case "Army"
oCC_Linked_1.Range.Text = ""
oCC_Linked_2.Range.Text = ""
oCC_Linked_3.Range.Text = ""
oCC_Linked_4.Range.Text = ""
Case "Civilian"
oCC_Linked_1.Range.Text = "N/A"
oCC_Linked_2.Range.Text = "N/A"
oCC_Linked_3.Range.Text = "N/A"
oCC_Linked_4.Range.Text = "N/A"
However, I think only the "Case 'Civilian'" portion is needed since nothing should happen if the user selects "Army" from the drop-down list.
Appreciate any help!