Excel Form Issues...again :)

  • Thread starter Thread starter BOHICA
  • Start date Start date
B

BOHICA

Well hello! You people seem to have an answer for me every time, and
guess what? I GOTS ME ANUTTER!!

Here goes: I have a form that users enter information in, and on
changes to those fields, calculations are performed and results put
into text boxes on the bottom (totals and such). My issue is this: I
want the value calculated to display like money ($##.##). I have
tried setting variables as currency (didn't do nuttin) and have tried
rounding to 2 decimals (didn't do it). When the total has decimals,
it displays them, but absolutely refuses to show me the money so to
speak when it is a whole number. How the hell do I get it to show
them pesky .00's?

(Sample code)

Dim muhTotal As Currency

(also tried this with/without the following code, and the following
code with the above defined as Dim muhTotal)

muhTotal= Round(muhTotal, 2)


So...Whatcha think?
 
TextBox1.Text = Format(muhTotal, "$###,###")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
WOOOHOOO!!! Thank you again. Worked like a freakin' charm. I am
kicking myself in the ass a bit for not even trying the format, but
whaddyagonnadoo?

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top