I have got 3 combo boxes (named SP_combox_box, CP_combo_box and Partial_evol_combo_box) which I only want enabled if another combo box (called PartSz_combo_box) is filled in as “Yes”. I’ve tried two different ways to do this, neither of which works.
The first was to write the following code associated with PartSz_combo_box’s Event procedure:
Private Sub PartialSz_combo_box_AfterUpdate()
If PartialSz_combo_box = "Yes" Then
SP_combo_box.Enabled = True
CP_combo_box.Enabled = True
Partial_evol_combo_box.Enabled = True
Else
SP_combo_box.Enabled = False
CP_combo_box.Enabled = False
Partial_evol_combo_box.Enabled = False
End If
End Sub
The second way I tried was through using conditional formatting. For instance, I clicked on the SP_combox_box and set the conditional formatting so that it read:
Condition 1 Expression Is [PartialSz_combo_box]="No" (and I then clicked on the enable icon).
Neither of these has worked, however. Can anyone set me along the right path?
Thanks
The first was to write the following code associated with PartSz_combo_box’s Event procedure:
Private Sub PartialSz_combo_box_AfterUpdate()
If PartialSz_combo_box = "Yes" Then
SP_combo_box.Enabled = True
CP_combo_box.Enabled = True
Partial_evol_combo_box.Enabled = True
Else
SP_combo_box.Enabled = False
CP_combo_box.Enabled = False
Partial_evol_combo_box.Enabled = False
End If
End Sub
The second way I tried was through using conditional formatting. For instance, I clicked on the SP_combox_box and set the conditional formatting so that it read:
Condition 1 Expression Is [PartialSz_combo_box]="No" (and I then clicked on the enable icon).
Neither of these has worked, however. Can anyone set me along the right path?
Thanks