Hi, I am a beginner to VB and I am not sure to calculate the average of the entries in a drop down combo box.
Basically what I am doing is making a program that will calculate the average of quiz grades, but the program must limit the number of quiz grades to 15. The program consists of: 1 drop down combo box, 1 add grade button (add grade to combo box list), 1 average button, and a label to display the average of the grades entered.
I have all the code done (i think) except for the code to be used in the AVERAGE button... I am stuck on this part.
I am trying to use a function such as:
cmbGrades.Text = FormatNumber(Average(Total, Count), 2)
PrivateFunction on Average (ByVal inttotal as Integer, ByVal intCount as Integer)
as Decimal
But I am just completely lost. Please help.
Basically what I am doing is making a program that will calculate the average of quiz grades, but the program must limit the number of quiz grades to 15. The program consists of: 1 drop down combo box, 1 add grade button (add grade to combo box list), 1 average button, and a label to display the average of the grades entered.
I have all the code done (i think) except for the code to be used in the AVERAGE button... I am stuck on this part.
I am trying to use a function such as:
cmbGrades.Text = FormatNumber(Average(Total, Count), 2)
PrivateFunction on Average (ByVal inttotal as Integer, ByVal intCount as Integer)
as Decimal
But I am just completely lost. Please help.