Format Textbox
Posted by Dave on October 18, 2001 9:17 AM
Hello,
Someone please help.
I have a textbox on a userform that is linked to a cell (control sourc)e.
The linked data are numbers like (1,700,000 or 33%) the problem is
the textbox shows the numbers as 1700000 and .333333333 How can I
format the result in the textbox?
. I put this code(s) in
the userform code like this
Private Sub TextBox1_Change()
yourTextBox.text = Formatnumber(Linked Data,[#,##0])
End Sub
here are some other variations.
yourTextBox.Text = FormatNumber("#,##0")
yourTextBox.text = Formatnumber(Linked Data,[#,##0])
FormatNumber ("$#,##0.00_);[Red]($#,##0.00)")
format(YourNumber, "###,###,##0.00")
format(YourPercentage, "###%")
FormatNumber(YourNum)
FormatPercent(YourPer
The problem is this are not working and when I have the code in
Private Sub TextBox1_Change()the textbox which is linked gives me a
compile error if I try to edit the textbox on the user form?
Help I'm stuck Thanks in advance again.