Decimal places in textbox on userform

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I am using Excel 97.

I have this userform which picks up data from a
spreadsheet. One of the textboxes gives the result of a
calculation, in some cases is more than 2 decimal places
which is not ideal as it's currency.

Can someone please tell me how to restrict the textbox on
the userform so that only 2 decimal places are displayed?

Thanks


Mark
 
Hi Mark
When you run the calculation you need to out the put a 'Format' following around the last line e.g

X = txtBox
Y = txtBox

txtBoxResult = Format(X * Y ,"#,##

cia
K

----- Mark wrote: ----

I am using Excel 97

I have this userform which picks up data from a
spreadsheet. One of the textboxes gives the result of a
calculation, in some cases is more than 2 decimal places
which is not ideal as it's currency

Can someone please tell me how to restrict the textbox on
the userform so that only 2 decimal places are displayed

Thank


Mar
 

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