#1
|
|||
|
|||
Help with G Maxey's Content Control Custom Event
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" 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" Appreciate any help! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Content Control Dropdowns - How to duplicate the content control and allow a second choice | ashleyf | Word VBA | 2 | 03-19-2020 09:11 AM |
Create Custom Document Properties with Content Control | kschmidt | Word VBA | 7 | 02-04-2019 03:09 PM |
Clicking the selected Content Control checkbox returns wrong control in vba event | DougsGraphics | Word VBA | 2 | 06-24-2015 07:31 AM |
How to Control Worksheet Event Handler in Module? | tinfanide | Excel Programming | 2 | 10-19-2014 09:46 AM |
Deleting a table from a content control -- preserving the content control | BrainSlugs83 | Word Tables | 8 | 11-14-2013 03:06 AM |