tk.unlimited
Active member
- Joined
- Apr 2, 2005
- Messages
- 27
- Programming Experience
- 1-3
I'm having trouble getting an average of marks from a listbox.. These are the following steps:
-Find out how many marks in the listbox - this is the limit for the loop
-Start a total variable with 0
-Using a FOR LOOP, loop though each mark in the marks listbox and add each mark to the total variable. The for loop will need to start from 0.
-You can access an item in hte listbox using the following line of code (Assuming iItemCounter is the counter being used by the FOR loop)
iMark = me.lstboxname.items(iitemcounter)
That is what im having trouble with... I know how to get the average from here.. Please Help
-Find out how many marks in the listbox - this is the limit for the loop
-Start a total variable with 0
-Using a FOR LOOP, loop though each mark in the marks listbox and add each mark to the total variable. The for loop will need to start from 0.
-You can access an item in hte listbox using the following line of code (Assuming iItemCounter is the counter being used by the FOR loop)
iMark = me.lstboxname.items(iitemcounter)
That is what im having trouble with... I know how to get the average from here.. Please Help