#1
|
|||
|
|||
Help, auto select drop down by another drop down value?
Hi
Is it possible to auto select a content control drop down, based by the display name by another content control drop down value, that corresponds to that display name? any help would be appreciated Thanks |
#2
|
|||
|
|||
I found a solution
But how do I execute the code on exit of the first dropdown? and how do lock the second drop down from manuel user selection? Sub Validate_ContentControl() Dim oCC As ContentControl Dim oControls As ContentControls Dim OCCEntry As ContentControlListEntry Set oControls = ActiveDocument.ContentControls Set oCC = ActiveDocument.ContentControls(1) For i = 1 To oCC.DropdownListEntries.Count If oCC.DropdownListEntries.Item(i).Text = oCC.Range.Text Then Set OCCEntry = oCC.DropdownListEntries.Item(i) ' Check the text against value - can be checked directly with text If OCCEntry.Value = OCCEntry.Value Then If oControls(2).Title = "Dropdown2" Then Set oLE = oControls(2).DropdownListEntries.Item(i) oLE.Select Else MsgBox "Error none found" Exit Sub End If End If End If Next i End Sub |
#3
|
|||
|
|||
Use the ThisDocument ContentControl_OnExit Event
Select Case ContentControl.Title Case "Your CC Title" YourTargetCC.LockContents = False 'Your Code YourTargetCC.LockContents = True End Select |
#4
|
|||
|
|||
Thanks you are indeed a helpful person
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
drop down box | dockta | Word | 1 | 03-25-2013 10:12 PM |
Drop Down Form Help | jwm1346 | Word | 3 | 07-31-2012 07:49 PM |
Automatically select first item in drop-down? | flackend | Excel | 4 | 08-29-2011 02:07 PM |
Form Field - Drop down selection causing auto text | chesspupil | Word VBA | 7 | 05-09-2010 05:43 AM |
Drop down menus | ncdc209 | Word | 0 | 01-04-2010 08:46 AM |