VB6 - Rounding a floating variable to 3 digits (Eg. 10.21 rounds to 10.210)

Hi,
   The requirement is very straight.
      I have to someway show the value of a variable (type double)  on a textbox.
      The restriction is that the decimal points should always be 3 digits.
      That means, if value is 10.21 it should display as 10.210
            (obviously 10.2134 should display as 10.213)

    Can you help me,
                      Thanking you,
                                      Sam
sgs1970Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ee_rleeConnect With a Mentor Commented:
try this

a=10.21
text1.text= format(a,"0.000")
0
All Courses

From novice to tech pro — start learning today.