Actually you may want to throw in the VAL() in case they do enter text by accident it would give them a casting from string to decimal error:
Format(Math.Round(CDec(Val(TextBox1.Text)), 2), "Currency")
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 5 of 5
Thread: Limit decimals in text input boxThreaded View
|
Click Here to Expand Forum to Full Width |