Hi
I need help with a small issue in my code.
Basically, the code has parent dropbox "Lives with", and if user selects "recipient lives alone" then it currently limits child dropbox (Occupants) to "N/A"
but if user selects "Recipient shares home" I would like for it to output a value, but for that box to be a combo box and not a dropbox, meaning that user can edit the output values instead of locked field. I would appreciate all the help I can get on this. Thanks!
Quote:
' /// RECIPIENT LIVES WITH OTHERS - OTHER OCCUPANTS
' note: lives alone = N/A (ok), but lives with other needs to allow custom text but DB is locked.
' reminder: once code is ready add "Lives with" to Document_ContentControlOnEnter
If .Title = "Lives with" Then
If StrOption = .Range.Text Then Exit Sub
Select Case .Range.Text
Case "Recipient lives alone"
StrOut = "N/A"
Case "Recipient shares home"
StrOut = "Occupant1; Occupant2" ' << need this to be editable.
Case Else
.Type = wdContentControlText
.Range.Text = ""
.Type = wdContentControlComboBox
End Select
With ActiveDocument.SelectContentControlsByTitle("Occup ants")(1)
.DropdownListEntries.Clear
For i = 0 To UBound(Split(StrOut, ","))
.DropdownListEntries.Add Split(StrOut, ",")(i)
Next
.Type = wdContentControlText
.Range.Text = ""
.Type = wdContentControlDropdownList
|