add sum from list
-
I want to add a sum in a textbox from a list of numbers in vb6 and it's not working sum = 0 i = 0 For i = 1 To List1.ListCount sum = sum + List1.Text Next 1 Text1.Text = sum Thankm you for helping me
This looks like a homework assignment of sorts. I'll give you a couple of hints. 1) VB starts counting at 0 by default. 2) List controls do not have a "Text" attribute. You will need to find a method that will allow you to access each item in the list independently. Good luck.
-
This looks like a homework assignment of sorts. I'll give you a couple of hints. 1) VB starts counting at 0 by default. 2) List controls do not have a "Text" attribute. You will need to find a method that will allow you to access each item in the list independently. Good luck.
-
Investigate the "List" property of the List object.
List1.List()