Return Exact Decimal Point

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KalupaPaluku
    New Member
    • Sep 2007
    • 6

    Return Exact Decimal Point

    I wonder that after arithmetic calculation, the result will be rounded-off in VB 2005, eg. the exact result after computation is 0.67, but the VB will return the result automatically to 1.00. How can i get the exact result( 0.67) displays in TextBox field?
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    Originally posted by KalupaPaluku
    I wonder that after arithmetic calculation, the result will be rounded-off in VB 2005, eg. the exact result after computation is 0.67, but the VB will return the result automatically to 1.00. How can i get the exact result( 0.67) displays in TextBox field?
    Just check the assigned variable is integer
    Or post how you are computing and assigning through code

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      hI,

      What data type have declared the Variable .
      Declare it as double/single/currency.
      if u have declared it as Integer/long, then u will get the Rounded figure..

      REgards
      Veena

      Comment

      • KalupaPaluku
        New Member
        • Sep 2007
        • 6

        #4
        Thanks. I get it . I use Decimal as data type, actually.

        Comment

        Working...