Do you mean you want to restrict what the user types in the TextBox to an
entry composed of at maximum, a single decimal point, digits characters (at
maximum, only two of them after the decimal point) and, at most, a single
currency symbol in character position 1 (with all other keystroke being
rejected)? What about thousands separator characters? Or did you have
something else in mind?
Rick thanks for the reply
I think I have got it but you may suggest something else
What I have done first is in the AfterUpdate event to takes care of the 99
or 110
dollar entry and turn into $99.00 $110.00
Private Sub txtIQPrice_AfterUpdate()
txtIQPrice.Value = Format(txtIQPrice.Value, "Currency")
End Sub
Then in the button click event I have this code to look at the non numeric
entries
If you think I might be missing something or if you foresee problems please
give suggestions
Thanks Mike
If IsNumeric(txtIQPrice.Value) = False Then
MsgBox "Must enter a valid dollar amount for" & " " _
& lblIQPrice.Caption & vbCrLf & txtIQPrice.Value _
& " " & "is not a valid entry", vbCritical, "360 Price Matrix"
Exit Sub
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.