View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Format of a TextBox in a userform

I am surprised. I just created a form and tried it, and it worked fine. I
assume the form is named volet_1, and that the wrap-around we see in the NG
is not in your code.

BTW, could I suggest that you use Sharad's solution, it is better than mine
(:-)).

--

HTH

RP
(remove nothere from the email address if mailing direct)


"MD" wrote in message
...
Thx Bob, onw more Q. I actually have 3 textboxes, when I run the code it
only does it on 1... I have the code setup like so...

Private Sub UserForm_Initialize()
volet_1.TextBox11.Value = Format(Sheets("data").Range("a11").Value, "#
### ##0 $")
volet_1.TextBox12.Value = Format(Sheets("data").Range("A12").Value, "#
### ##0 $")
volet_1.TextBox13.Value = Format(Sheets("data").Range("a13").Value, "#
### ##0 $")

End Sub


"Bob Phillips" a écrit dans le message
de news: ...
Try,

Textbox1.Text = Format(the_amount,"# ### ##0$")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"MD" wrote in message
...
Good day,

I have a userform that has a TextBox. In this TextBox, I want to enter
dollar amounts so that it looks like this: 1 234 567 $. Right now I

get
this: 1234567.

regards,

MD