obulldog27
Programmer
The code below is set so if I enter an number such as: 40015 it will automatically be converted to $400.15 BUT the problem is if I enter 10 it will NOT convert to $10.00 but instead $.10 or the number 100 will convert to $1.00. I think if I can test to see if their are 2 or 3 digits then change to currency a different way. Can any one help?
If checkamtc.Text <> "" Then
checkamtc.Text = checkamtc.Text * 0.01
checkamtc.Text = Format(checkamtc.Text, "$#.00")
End If
The user will input just the number 10 (not 1000) so I need this to change when lost_focus to $10.00. but for $400.15 the user will enter 40015. The user will know he wants .15 as the cents. So the rule is the last two digits will always be cents.
If checkamtc.Text <> "" Then
checkamtc.Text = checkamtc.Text * 0.01
checkamtc.Text = Format(checkamtc.Text, "$#.00")
End If
The user will input just the number 10 (not 1000) so I need this to change when lost_focus to $10.00. but for $400.15 the user will enter 40015. The user will know he wants .15 as the cents. So the rule is the last two digits will always be cents.