I have a project at my school and I need to calculate the average of all the grades, we're using ms word vba. I know the code is soo dumb but im new and young.
CodePudding user response:
Add the line
Dim average as Double
near the top, and change the assignment lines to use CInt()
, e.g.
firstnumber = CInt(txtMath.Text)
and change the average =
line to the following
average = (firstNumber secondNumber thirdNumber fourthNumber fifthNumber sixthNumber) / 6