「Operator '=' is not defined for type 'CivilStatus' and type 'Integer'.」というエラーが表示されます。
コード:
Private Sub cboCivilStatus_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboCivilStatus.SelectedValueChanged
If cboCivilStatus.SelectedValue = 2 Then
dtpDateMarried.Enabled = True
Else
dtpDateMarried.Enabled = False
End If
End Sub