![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#4
|
||||
|
||||
|
OK, firstly get rid of the legacy form field you were using for the Tipo de Incremento and instead put a Dropdown List Content Control in its place, set its Title property to TIncremento and add the four options.
Then add this code to your ThisDocument module Code:
Private Sub Document_ContentControlOnExit(ByVal aCC As ContentControl, Cancel As Boolean)
Dim i As Long, bOne As Boolean
With aCC
If .Title = "TIncremento" Then
Select Case LCase(.Range.Text)
Case "disco", "filesystem"
bOne = True
Case "memoria", "cpu/slices"
bOne = False
End Select
LockCC ActiveDocument.SelectContentControlsByTitle("lunidad")(1), Not bOne
LockCC ActiveDocument.SelectContentControlsByTitle("espacio")(1), Not bOne
LockCC ActiveDocument.SelectContentControlsByTitle("memoria")(1), bOne
End If
End With
End Sub
Function LockCC(aCC As ContentControl, bLock As Boolean)
With aCC
aCC.LockContents = False
If bLock Then
aCC.Range.Text = ""
.Color = wdColorGray50
Else
.Color = wdColorYellow
End If
aCC.LockContents = bLock
End With
End Function
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Assigning Macro to Drop Down list Content Control
|
aussiew | Word VBA | 5 | 03-10-2019 02:55 PM |
| How to unlock header content control in form | Nikko963 | Word VBA | 6 | 04-13-2018 03:08 PM |
How to get a Drop Down List Content Control box to fill in other areas
|
snips1982 | Word | 2 | 03-22-2017 03:37 AM |
How do I add selection of multi line content control list to specific table cell
|
Dudlee | Word VBA | 1 | 09-20-2016 04:58 PM |
| Word 2010 Content Control help - Combo Boxes vs Drop Down List | proghy | Word | 1 | 09-16-2014 02:01 PM |