-
Formatting Text Box
hello, well i want to format a text box called txtdis.text
the contents of this will be prices so for e.g 3.25 and so on
but it ends up going further in and comes out with an output of 3.25675 and so on.
How can i cut this to make it a 2 decimal place figure like normal cash :)
cheers
-
txtdis = format(myValue, "#0.00")
-
-
just a variable
could be 3.25675 or whatever
-
the items that will be in txtdis will be the values coming out of a list box, like items in the list box will be prices, when they go into the textbox its all multiple decimil placed. :/
so what would the variable be :/ sorryy im a newb1e only been programming for 3 months
-
with no code to hand, it has to be along the lines of :
Textbox1.text = format(listview1.SelectedItems.Item(0).text, "##0.00")
thats just playing with objects and properties and in theory selects the first item i.e. item(0) and trys to display it as a decimal number, with two decimal places
Are you not alllowed to do research where you are, because if so you will struggle and this forum is better placed to pose really hard questions, which we all have suffered from
-
can you tell me a newbie helper place then :) i went to google and wrote vb forums and this place showed up :) it has been a great help though :)
-
msdn is a god place to start