How do I convert this exponential number?

Posted on 2006-03-31
Last Modified: 2008-03-04
I have this number -1.34152189427569E+34 that I am trying to convert into a number I can use, but with the code below I just get it as a double, with the exponent on the end. I tried converting it to a decimal number type, but no dice. Help!

Dim a As Double
        Dim num As String
        Dim conv As Double

        readcffile(1, 0) ' ignore
        a = calculate(8520322, 6457197, 1, 0) ' ignore
        num = a.ToString
        TextBox1.Text = num

        conv = Double.Parse(num, Globalization.NumberStyles.Float)


Question by:bradbritton
    1 Comment
    LVL 85

    Accepted Solution

    Like this?...

            Dim strNum As String = "-1.34152189427569E+34"
            Dim dbl As Double = Double.Parse(strNum)
            Dim strDbl As String = dbl.ToString("n")
            MsgBox(dbl.ToString & " = " & strDbl)

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now