List Boxes
-
How can I code to get a calculated answer which is shown in a textbox to a listbox, and further answers added to that list box. :confused:
-
How can I code to get a calculated answer which is shown in a textbox to a listbox, and further answers added to that list box. :confused:
Your question doesn't provide any details, but you add a string, even if it's the result of a calculation, to a listbox by doing something like:
Dim result As Integer = x \* y ListBox1.Items.Add(result.ToString("N"))
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Your question doesn't provide any details, but you add a string, even if it's the result of a calculation, to a listbox by doing something like:
Dim result As Integer = x \* y ListBox1.Items.Add(result.ToString("N"))
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007I have the product of a quantity and price (both doubles) to give total dim total as double the total is then displayed in a textbox when a button is clicked. How would I get this result (total) in a listbox by clicking a button, and other subsequent results into that listbox. What is "N" in your above response Thank you :~
-
Your question doesn't provide any details, but you add a string, even if it's the result of a calculation, to a listbox by doing something like:
Dim result As Integer = x \* y ListBox1.Items.Add(result.ToString("N"))
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007It works thanks a million. With the totals displayed in the listbox, how can I find the total of the numbers displayed to with two decimal places