Quote:
Originally Posted by Pat Phelan
Code:
If optRateA.Value = True Then
intGross = intHours * optRateA
Else
If optRateB.Value = True Then
intGross = intHours * optRateB
Else: optRateC.Value = True
intGross = intHours * optRateC
End If
Does this help? Code formatting can be a wonderful thing!
-PatP
|
Indeed.
In visual studio, hold down Ctrl, then press "K", then WITHOUT LETTING GO OF CTRL, press "D".
Tends to cut down on time needed to hunt down issues with control structure formatting...
Also, look in to using a RadioButtonList. You could condense that to a single line by hitting up the SelectedValue/SelectedIndex properties:
intGross = intHours * yourRadioButtonList.SelectedValue