Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have been trying to figure out how to format a text box so when
numbers are entered it formats it in the currency format. I got this to work by reading several examples from a search I did on this group. However It wont format to two decimal places.. here is an example.. Private Sub TextBox13_Change() Dim sStr As String sStr = Trim(TextBox13.Text) sStr = Application.Substitute(Application. _ Substitute(sStr, ",", ""), "$", "") If IsNumeric(sStr) Then TextBox13.Text = Format( _ TextBox13.Text, "$###,###,###.##") End If End Sub This code allows what I want.. but.. I can only enter the ones digit.. ie.. $1-$9 because it automatically puts in the . and then starts in on the change.. so if I wanted to put in something for $15.34 It would come out $1.53 and then wouldnt allow anymore input. Can anyone help! Thanks! Joe Derr |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
worksheet is set up for 2 decimal places but format changes | Excel Discussion (Misc queries) | |||
format issues with decimal places | Excel Discussion (Misc queries) | |||
decimal places in format cell | Excel Discussion (Misc queries) | |||
Can you set to default the # of decimal places in Format Cells? | Setting up and Configuration of Excel | |||
Formula for: Format Decimal places? | Excel Discussion (Misc queries) |