Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2018, 04:10 AM
deepak_fer deepak_fer 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 2016
Novice
Combo Box Content Control: How to update the list throughout the whole document?
 
Join Date: Mar 2018
Posts: 5
deepak_fer is on a distinguished road
Default



Quote:
Originally Posted by Guessed View Post
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
Hi Andrew,

Thank you so much.
It works like a charm and I think it will be easier for the client to understand and as it is embedded in the document, I love it!

Really appreciate it!

Cheers
Reply With Quote
Reply



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 03:23 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