Dollars in a text box

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I have a text box, and I want the user to enter a dollar
value. How do I force the entry to a currency, and how do
I display it as $123.45 ??

Thanks in advance...
 
But this is a text box in a VBA form - not a cell on the
worksheet. Formatting the column doesn't work on a form
(unless I'm missing something in your reply...)

Thanks - Jeff
 
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
if isnumeric(Textbox1.Value) then
Textbox1.Value = Format(Textbox1.Value,"$ #,##0.00")
End if
End Sub
 

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