Formating currency in text box
This is the code I got yesterday, but I'm still having
problems.
Private Sub txtHouseCost_AfterUpdate()
txtHouseCost.Value = Format(CInt(txtHouseCost.Value), "#
##0 $")
End Sub
When I enter a number it rounds up or down, I lose the
digits after the decimal, and the $ is at the left end of
the number. The other problem I have is if I move the $
to the front, $# ##0 , the total doen't work. I'm using
Total = Val(txtHouseCost.Value) + Val(txtLotCost.Value) +
Val(txtOptionCost.Value)
Any ideas to help this old struggling newbie?
|