Currency in Userform

F

Fixital

Hello,

Office 2000 on Windows NT.

Is there any way to display the "$" in a userform? I have it on the worksheet,
but would like to display it in the textbox on the userform.

Also, I have used the "Round" on the worksheet to display only 2 decimal
places in the same textbox. Is there another way to do this?

Appreciatively, Al
 
R

Ron de Bruin

Hi Fixital

You can use the format function

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.TextBox1.Text = Format(TextBox1, "your format")
End Sub
 
B

Bob Phillips

Al,

If you are wanting to format user input, you need to do it at the end, or as
it is input. The formatting is done with

Textbox1.Text = Format(Textbox1.Text,"$#,##0.00")

That shows the currency and the number of dec places.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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