Example : How to Calculate and show values in VB 2013.
If e.KeyCode = Keys.Enter Then
TXTCSAMOUNT.Text =(Val(TXTCSAMOUNT.Text)).ToString("######0.00")
'Convert The Particular Value Into Decimal float Form In a Box
TXTATOPAY.Text = (Val(TXTPDUES.Text) + Val(TXTCSAMOUNT.Text)).ToString("######0.00")
TXTPAMOUNT.Focus()
End If
-------------------- OR ----------------------
If Val(TXTPAMOUNT.Text) > Val(TXTATOPAY.Text) Then
TXTADVPMT.Text = (Val(TXTPAMOUNT.Text) - Val(TXTATOPAY.Text)).ToString("######0.00")
TXTCDUES.Text = (Val(TXTCDUES.Text)).ToString("######0.00")
TXTREMS.Focus()
Exit Sub
End If
0 Comments