Rounding digits?

Rounding digits?

Anonymous
Not applicable
214 Views
5 Replies
Message 1 of 6

Rounding digits?

Anonymous
Not applicable
How do I set the format for a double to display? It's showing the complete
level of accuracy and I just need two decimal places.
I've looked through help for rounding and display, but I must be looking for
the wrong thing.

--
James Wedding, E.I.T.
IT Manager
Jones & Boyd, Inc.
Dallas, Texas
jwedding@NOSPAMjones-boyd.com
Remove NOSPAM from e-mail for reply.
0 Likes
215 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Something like this:

txtBottom = Format(CStr(selElev), "0.00")

- Tom

"James Wedding, E.I.T." wrote in message
news:778AA2B0DDF721AC1261FE8909627374@in.WebX.maYIadrTaRb...
> How do I set the format for a double to display? It's showing the complete
> level of accuracy and I just need two decimal places.
> I've looked through help for rounding and display, but I must be looking
for
> the wrong thing.
>
> --
> James Wedding, E.I.T.
> IT Manager
> Jones & Boyd, Inc.
> Dallas, Texas
> jwedding@NOSPAMjones-boyd.com
> Remove NOSPAM from e-mail for reply.
>
0 Likes
Message 3 of 6

Anonymous
Not applicable
Hi James,
If your using vb6 or version 6 of vba in 2000i, there is a round function.
If your using version 5 in 2000, you'll have to come up with a function. There
are several floating around including the one below and a shorter version on
Frank's site (www.acadx.com). If your not concerned with rounding up or down you
can use the format function Tom mentioned, but if I remember correctly, it just
clips the number.
-Josh

"James Wedding, E.I.T." wrote:

> How do I set the format for a double to display? It's showing the complete
> level of accuracy and I just need two decimal places.
> I've looked through help for rounding and display, but I must be looking for
> the wrong thing.
>
> --
> James Wedding, E.I.T.
> IT Manager
> Jones & Boyd, Inc.
> Dallas, Texas
> jwedding@NOSPAMjones-boyd.com
> Remove NOSPAM from e-mail for reply.
0 Likes
Message 4 of 6

Anonymous
Not applicable
Hi Josh,

Easy enough to test. Just copy the following into a module.

Public Sub test()

Debug.Print (Format(3.14159, "0.00"))
Debug.Print (Format(3.14559, "0.00"))

End Sub

- Tom

"Minkwitz Design" wrote in message
news:3A958C60.93FDB5AE@minkwitz-design.com...
> Hi James,
> If your using vb6 or version 6 of vba in 2000i, there is a round
function.
> If your using version 5 in 2000, you'll have to come up with a function.
There
> are several floating around including the one below and a shorter version
on
> Frank's site (www.acadx.com). If your not concerned with rounding up or
down you
> can use the format function Tom mentioned, but if I remember correctly, it
just
> clips the number.
> -Josh
0 Likes
Message 5 of 6

Anonymous
Not applicable
My mistake, Sorry Tom.
-Josh

Tom Gilmer wrote:

> Hi Josh,
>
> Easy enough to test. Just copy the following into a module.
>
> Public Sub test()
>
> Debug.Print (Format(3.14159, "0.00"))
> Debug.Print (Format(3.14559, "0.00"))
>
> End Sub
>
> - Tom
>
> "Minkwitz Design" wrote in message
> news:3A958C60.93FDB5AE@minkwitz-design.com...
> > Hi James,
> > If your using vb6 or version 6 of vba in 2000i, there is a round
> function.
> > If your using version 5 in 2000, you'll have to come up with a function.
> There
> > are several floating around including the one below and a shorter version
> on
> > Frank's site (www.acadx.com). If your not concerned with rounding up or
> down you
> > can use the format function Tom mentioned, but if I remember correctly, it
> just
> > clips the number.
> > -Josh
0 Likes
Message 6 of 6

Anonymous
Not applicable
That did it. Thanks for helping the newbie!

--
James Wedding, E.I.T.
IT Manager
Jones & Boyd, Inc.
Dallas, Texas
jwedding@NOSPAMjones-boyd.com
Remove NOSPAM from e-mail for reply.
0 Likes