QUICK QUESTION: How do I KEEP trailing zeros?

I have an array Dimmed as Variant.  It has about 25 items in it, mostly integers, strings, and some currency.  I extracted the currency values and displayed them on a Form using CStr(arrArray(x)) but I noticed that the trailing zeros are stripped away.  How do I keep them?

For example:
51.50 becomes 51.5
51.00 becomes 51
51.23 remains 51.23

I want it so that:
51.50 remains 51.50
51.00 remains 51.00

How do I do this?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

format (Value, "#,###.00")  this will keep 2 digits to the right of the decimal point, even if the rightmost is/would be 0)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CoderBboyAuthor Commented:
The numbers range from 1 to 100,000,000.  How do I know how many # to use?
the Format function is smart enough to know the #,###.00 means use the comma separator, regardless of the size of the number, be it 1,000.00 or 1,000,000,000.00 ...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.