Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Case problem

Status
Not open for further replies.

sp76

Programmer
Jul 1, 2003
59
AU
How can i achieve the below, using Select Case statement

Private Sub optInterestOnly_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optPandI.CheckedChanged, optInterestOnly.CheckedChanged

If optPandI.Checked = True Then
'Do Something
Else
If optInterestOnly.Checked = True Then
'Do Something
End If
End If

End Sub
 
You cant use a select case in this instance, as the select case statement is designed to interrogate one variable. You could however shorten your code to perform the IF statements on one line
Code:
If optPandI.Checked Then Me.zdosomething1
If not optPandI.Checked and optinterestonly.checked Then Me.zdosomething2



Sweep
...if it works dont mess with it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top