Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 05-22-2018, 03:45 PM
macropod's Avatar
macropod macropod is offline Cascading Drop Down Windows 7 64bit Cascading Drop Down Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,362
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could use a ContentControlOnExit macro in the 'ThisDocument' code module of the document or its template, coded like:
Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
Dim i As Long
With CCtrl
  If .Title = "Master" Then
    If .Range.Text = "N/A" Then
      For i = 1 To 2
        With ActiveDocument.SelectContentControlsByTitle("Slave")(i)
          .Type = wdContentControlText
          .Range.Text = "N/A"
          .LockContents = True
        End With
      Next
    Else
      For i = 1 To 2
        With ActiveDocument.SelectContentControlsByTitle("Slave")(i)
          If .Type = wdContentControlText Then
            .LockContents = False
            .Range.Text = ""
            .Type = wdContentControlDropdownList
          End If
        End With
      Next
    End If
  End If
End With
End Sub
In the above code, the controlling content control is titled 'Master' and the two dependent content controls are titled 'Slave'.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cascading Drop Down Help with cascading dropdown list SaraO Word VBA 43 01-25-2023 04:05 PM
Userform with Multiple Cascading Drop Down Lists Populated with External Source Data venganewt Word VBA 21 05-16-2018 02:05 PM
Cascading Drop Down Cascading List Word 2010 Marvel Word VBA 11 05-14-2016 02:08 AM
Cascading Drop Down Issue Using Word Document with Cascading Drop Down Lists LynnMac2016 Word VBA 3 04-06-2016 06:15 AM
Cascading Drop Down How to update cascading styles? mmmb Word 3 01-21-2016 07:08 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft