I've got a nice code for 2 dependent comboboxes(see below).
How do I get a third combobox (named subvraag2) to work as a dependent on the second one (subvraag)?
copying the code to the other subvraag_change event doesnt work.
How do I get a third combobox (named subvraag2) to work as a dependent on the second one (subvraag)?
copying the code to the other subvraag_change event doesnt work.
Code:
Private Sub Hoofdvraag_Change()
Dim strRange As String
If Hoofdvraag.ListIndex > -1 Then
strRange = Hoofdvraag
Label7.Caption = strRange
strRange = Replace(strRange, " ", "_")
strRange = Replace(strRange, "/", "_")
strRange = Replace(strRange, "'", "_")
With subvraag
.RowSource = vbNullString
.RowSource = strRange
.ListIndex = 0
End With
Else
Label7.Caption = "Pas de question sécondaire // Geen secundaire vraag"
End If
End Sub