Hello :) I have a formula like this
Dim numbHolder as Decimal = 'Anything i will send'
If val(txtbox1.text) <= 9 then
txtbox2.text = numbHolder * (0.0 & val(txtbox1.text))
txtbox2.text = numbHolder * (0. & val(txtbox1.text))
If I were you I would avoid mixing
Val and calculations in the one place. Try separating the parsing and populating text fields with the calculation like this:
' Parse/Load Values Dim numbHolder As Decimal = 10 'Anything i will send' Dim percentage As Decimal = CType(Val(txtbox1.Text), Decimal) / 100 ' Calculate Dim result = numbHolder * percentage ' Populate txtbox2.Text = result.ToString()