Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 03-18-2018, 03:02 AM
Guessed's Avatar
Guessed Guessed is offline Combo Box Content Control: How to update the list throughout the whole document? Windows 10 Combo Box Content Control: How to update the list throughout the whole document? Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,187
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The source lists can be coded into the vba but then the client is going to be confused even more if they need to edit the vba. You could also embed the lists in a custom xml file but there is no real benefit in terms of making it easy for the client to update the list.

IMO the slickest way would be to set up the first instance of each CB as the 'master' and allow the user to manually update that instance and then have the macro copy that list to the other related instances.

So use the Title property of each CC to link the series. And use the Tag property to define the CC which contains the master list for that series. Then use the following macro to copy the list from each 'Master' to the other CCs which share its Title property.
Code:
Sub UpdateCCList()
  Dim aCCMaster As ContentControl, aCC As ContentControl, i As Integer, sTitle As String
  For Each aCCMaster In ActiveDocument.SelectContentControlsByTag("Master")
    sTitle = aCCMaster.Title
    For Each aCC In ActiveDocument.SelectContentControlsByTitle(sTitle)
      If aCC.Tag <> "Master" Then
        aCC.DropdownListEntries.Clear
        For i = 1 To aCCMaster.DropdownListEntries.Count
          aCC.DropdownListEntries.Add aCCMaster.DropdownListEntries(i).Text
        Next i
      End If
    Next aCC
  Next aCCMaster
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box Content Control: How to update the list throughout the whole document? How to get a Drop Down List Content Control box to fill in other areas snips1982 Word 2 03-22-2017 03:37 AM
Combo Box Content Control: How to update the list throughout the whole document? Multi-column combo box content control? sugarjay Word 1 03-21-2017 07:20 PM
Combo Box Content Control Calculate on selection help ciresuark Word 0 03-06-2015 01:49 PM
Word 2010 Content Control help - Combo Boxes vs Drop Down List proghy Word 1 09-16-2014 02:01 PM
Download Content Control List cjacob28 Word 0 06-26-2011 11:23 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:55 AM.


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