Hiya
I thought I had this piece of code working, but when debugging realised it is not adding up all of the totals.
I have an array which is called Data(0 to 3)
Each of the array elements have a figure and I need to add these together./ Figures are:
0 - 90
1 - 54
2 - 20
3 - 54
When running this code - I thought tit would add them up, but it is only counting the firs tfigure on the array. code I have is
Visual basic
-------------------------------------------------------------------------
Sub DrawPieChart()
'Create an array to enable the prgoram to calculate the percentages
Dim Total as Integer
Total = 0
For Total = Data(0) To Data(3)
Next Total
-------------------------------------------------------------------------
I have tried changing this to add in total = total + data(i), but it then calculates 0.
Can anyone help me? I am sure this is a small change required.......but just hitting a brick wall.....![]()
Thanks
Tracey


Reply With Quote
