1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

vb.net 2013 - double?

Discussion in 'Visual Basic ( VB )' started by 1912Dummy, May 27, 2014.

  1. 1912Dummy

    1912Dummy New Member

    Joined:
    Mar 29, 2013
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    0
    hello,

    does anyone know how i can convert a double without a negative ()

    it seems i get (£50.00) - this is a negative value

    but i like to have it as -£50.00

    i use:

    Code:
    Dim l As Double
    l = cDAL.VarToDbl(Label6.Text + Amount1) 'amount1 is a double
    lblrunning.Text =  Format(l, "c")
    
    cDAL:
    Code:
    Public Shared Function VarToDbl(ByVal o As Object) As Decimal
    
            Try
                Return Decimal.Parse(o.ToString)
            Catch
                Return 0
            End Try
    
        End Function
    
    thank you
     

Share This Page