Calculating an average of the entires in a drop down combo box?

GREEN79

New member
Joined
Apr 1, 2006
Messages
1
Programming Experience
Beginner
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.
 
No, that's all wrong, your suggested function name is misleading as to what functionality you're aiming at, also this function would not add anything to the basic division math operator. Just divide Total by Count.
 
Back
Top