Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a textbox containing numerical value, but due to the formula I am using for my project when this data is added into a listbox there are alot of values present after the decimal point. I was wondering how I could alter this to restrict the listbox to only displaying 3 values after the decimal point?
Posted
Updated 24-Aug-12 15:33pm
v2

You would start by reading the documentation[^]
 
Share this answer
 
Comments
b2906 24-Aug-12 21:54pm    
still unsure of how to do it..
[no name] 24-Aug-12 22:36pm    
Really? youTextbox.Text = yourDecimal.ToString("N3");
try Like This

Dim mydecimal As Decimal = Format(yourvalueFrmDatabase, "0.000")

textbox1.text = mydecimal 
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900