View Single Post
 
Old 05-01-2021, 11:01 AM
shaun0406 shaun0406 is offline Windows 10 Office 2010
Novice
 
Join Date: Dec 2020
Posts: 19
shaun0406 is on a distinguished road
Smile Cascading Combobox / Dependent Drop Down

Hi, I am am creating a form with 3 combobox dependent with each other.

I have referred to macropod's #12 post from
https://www.msofficeforums.com/word-...down-list.html

This work perfectly, but then I have a couple of situations where CB2 have the same choices with a different CB1, but CB3 is dependent to both CB1 and CB2

I have my combobox title as, Company, Program, Plan.

I was thinking of adding an if statement to check the value of the CB1 (Company)
Currently, my Company choices are AARP and AETNA

If .Title = "Program" Then

If StrOption = .Range.Text Then Exit Sub
Select Case .Range.Text
Case "MAPD"
' If (company value) = AARP then
' StrOut = "object1, object2, object3"
' End If
' If (company value) = AETNA then
' StrOut = "item1, item2, item3"
End If

Case Else
.Type = wdContentControlText
.Range.Text = ""
.Type = wdContentControlComboBox
End Select

I am having trouble coding the If statement, I am having trouble looking into grabbing the CB1 value and store it to a variable.

I have attached my document if you want a reference
Thanks!
Attached Files
File Type: docm YPageMedicareEdits.docm (58.9 KB, 5 views)
Reply With Quote