Limiting decimals text box

D

D.S.

In my userform text boxes, I'm returning worksheet values of cells that are
custom formatted to 3 decimal places.

I'm returning to separate text boxes in the userform, the 'high', 'low', and
'average' worksheet functions of the cells.

How can I limit the text boxes to only show 3 decimal places?

D.S.

Donald (e-mail address removed)
 
B

Bill Barclift

Use the round method with the 'high', 'low', or 'average' as the first
argument, like:

txtMyTextBox.Text = Round(dblHigh, 3)


Bill Barclift
 
D

D.S.

Thanks Bill! That was exactly what I was looking for. Works great.

D.S.

Donald (e-mail address removed)
 
D

D.S.

Thanks Bill! That was exactly what I was looking for, works great.

D.S.

DonaldDonald (e-mail address removed)
 

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

Top