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

Loading

Categories: VB .Net Codes

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.