in Addition to Richards Solution
the
&
in VB is for string concatenation
in VB the AND Operator ist simply
And
and short-circuit
AndAlso
simmilar
Or
and
OrElse
Also
IsNumeric
is old and normal you want to use
TYPE.TryParse
of the specific type you want.
and are you sure about
Decimal[
^]? its a 128bit field.. that maths don't really look like you need that.. maybe just go with
Double[
^]
and make yourself a favour, give that controls better names..
like CheckBox2 -> cb_7DaysLate
gives a better hint when you look over that function in a week.
similar to that TextBoxes
Dim input As Double
If Double.TryParse(TextBox3.Text, input) AndAlso cb_7DaysLate.Checked AndAlso input <= 20 Then
Dim _temp As Double = input * 5
TextBox4.Text = _temp.ToString
TextBox5.Text = (_temp * 0.1 - 0.1).ToString
Else
MessageBox.Show("Please Enter valid value equal to 20 and below!")
End If