[RESOLVED] Format as currency
Please excuse a beginner in VB Net with what is probably a really dumb question.
I am trying to write some code that will format the text in a text-box as currency, so that if the user enters "6", the text-box will show "$6.00" after the user exits the text-box. (I want to allow for all the variations of users entering 6 or 6.00 or $6 or $6.00.)
I've got:
HTML Code:
Private Sub txt_nett_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_nett.TextChanged
txt_nett = FormatCurrency(txt_nett)
End Sub
and an error message that says: "Value of type 'String' cannot be converted to 'System.Windows.Forms.TextBox'.
The frustrating thing is that I could do this in a trice in VBA (with which I am much more familiar)!
Thank you