Can anyone help with this please. This works OK with totaling up what ever is put in the textboxes. But what i can figure is that when leaving the text box it rounds it up. if i put 1.5 in it rounds it to 2 removing the .0 i have tried formatting string. I want it to show 1.5
Code:
Public Sub PalletQTY_TextChanged(ByVal sender As System.Object, ByVal e As EventArgs) Handles PalletQTYTextBox.TextChanged, PalletQTYTextBox2.TextChanged, PalletQTYTextBox3.TextChanged, PalletQTYTextBox4.TextChanged, PalletQTYTextBox5.TextChanged


        Try


            Dim Result As Decimal
            Dim Operand1, Operand2, Operand3, Operand4, Operand5 As Decimal


            ' Try and convert the text in the first textbox to a Single.
            Try
                Operand1 = Convert.ToDecimal(PalletQTYTextBox.Text)
            Catch ex As Exception
                Operand1 = 0
            End Try


            ' Try and convert the text in the second textbox to a Single.
            Try
                Operand2 = Convert.ToDecimal(PalletQTYTextBox2.Text)
            Catch ex As Exception
                Operand2 = 0
            End Try


            Try
                Operand3 = Convert.ToDecimal(PalletQTYTextBox3.Text)
            Catch ex As Exception
                Operand3 = 0
            End Try


            ' Try and convert the text in the second textbox to a Single.
            Try
                Operand4 = Convert.ToDecimal(PalletQTYTextBox4.Text)


            Catch ex As Exception
                Operand4 = 0
            End Try


            ' Try and convert the text in the second textbox to a Single.
            Try
                Operand5 = Convert.ToDecimal(PalletQTYTextBox5.Text)
            Catch ex As Exception
                Operand5 = 0
            End Try




            Result = Operand1 + Operand2 + Operand3 + Operand4 + Operand5
            labTotal.Text = Result.ToString


        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try


    End Sub