visual basics equal to or greater than

vb.net

Solution

   Dim weight as Decimal = Decimal.Parse(WeightTextBox.Text) 
   If weight  >= 0 AndAlso weight <= 10 Then

        HandDecimal = 1

    ElseIf weight  > 10 AndAlso weight <= 100 Then

        HandDecimal = 3

    ElseIf weight > 100 Then

        HandDecimal = 5

    End If

Problem

I am trying to write some code that says if `textbox1` is equal to 0 between 10 then HandDecimal = 1. Else if `textbox1` is equal to 10.1 through 100, then HandDecimal = 3. Else if `textbox1` is equal to 100.1 and greater than HandDecimal = 5. Here is my code, but it does not seem to work for me. ``` If WeightDecimal = 0 <= 10 Then HandDecimal = 1 ElseIf WeightTextBox.Text = 10 <= 100 Then HandDecimal = 3 ElseIf WeightTextBox.Text >= 100.1 Then HandDecimal = 5 End If ``` How do I have to change the code to make it work?

Original source