Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is the format of coding the average in ms word vba? I'm new sorry Please be nice

enter image description here

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading