![]() |
#1
|
|||
|
|||
![]()
Hi All!
I have a combobox with multiple entries on my template. Each entry has multiple values separated by the "|" symbol. When the template loads, a userform pops up asking the user to type in a number. That number is then put into the combobox in my document. I then want the various values for the combobox entry (assuming they typed in a number that is listed in the combobox) to be placed into various contentcontrols in my document. I know how to do it if the entry has only ONE value but I'm a little confused with multiple values. Here is the code I am currently using to act on just ONE value for an unrelated action... Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Dim i As Long, StrDetails As String With ContentControl If .Title = "Client" Then For i = 1 To .DropdownListEntries.Count If .DropdownListEntries(i).Text = .Range.Text Then StrDetails = Replace(.DropdownListEntries(i).Value, "|", Chr(11)) Exit For End If Next ActiveDocument.ContentControls(2).Range.Text = StrDetails End If End With End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA ppt ComboBox behaivor: 1.OnFocus change value 2. get dropdownlist doesn't disappear after mousec | janism22 | PowerPoint | 2 | 03-26-2015 12:35 AM |
ActiveDocument.ContentControls(ID) not working | Tejas.T | Word VBA | 3 | 03-09-2015 06:50 PM |
Updating grouped ContentControls in Word 2010 | MGerhard | Word VBA | 3 | 08-04-2014 02:34 AM |
![]() |
ScottA | Excel Programming | 3 | 05-06-2014 12:49 PM |
XML parsing & Object variable not set (Error 91) | tinfanide | Excel Programming | 0 | 12-29-2011 08:43 AM |