decimal place (1 Viewer)

ariel81

Registered User.
Local time
Today, 09:01
Joined
Dec 31, 2006
Messages
75
i can't get two decimal place...anyone can advice me how to get two decimal places?

e.g:
Code:
   Dim a As Integer
   Dim b As Integer
   Dim c As Single
        
        a = 18
        b = 7
        c = a / b

    f.Text138 = c

the result i got in textbox "Text138" is 2.571429 the "Text138 properties" for "Decimal Places was set to 2". However i still get the result as 2.571429
 

ariel81

Registered User.
Local time
Today, 09:01
Joined
Dec 31, 2006
Messages
75
i have already Dim C as Single, see above
 

missinglinq

AWF VIP
Local time
Today, 12:01
Joined
Jun 20, 2003
Messages
6,423
f.Text138 = format(c,"0.00") will get you 2 decimal places!
 

Bat17

Registered User.
Local time
Today, 16:01
Joined
Sep 24, 2004
Messages
1,687
"Text138 properties" for "Decimal Places was set to 2".
Did you also set the format property to 'Fixed'?

Peter
 

Users who are viewing this thread

Top Bottom