scudzilla 32 Junior Poster

These are just guesses.
I've tried only two types for incrementer (float and long), and kept total as long. The thing is, when incrementer was float which is 4 bytes, it probably converts total from long (8 bytes) into float, add incrementer to it, then convert back to long. Maybe the conversion causes loss of the upper bits and therefore gives out an incorrect value. It probably goes the same with int, which is also 4 bytes. (I've never tried int in your program). That is probably why these two types give the wrong output despite total not reaching its max value. With incrementer as long or double, which is another type with 8 bytes, total will not be converted down, and thus, no loss of accuracy. However, they may reach maximum value and give out the wrong output. (For long, you and I both have experienced having negative output, which means that, being signed, it exceeded the max positive value) (For double, I have not tried it but you said it kept printing out the max value)

scudzilla 32 Junior Poster

Have you tried using bigint?

scudzilla 32 Junior Poster

You can use the function IsNumeric to check if a certain string is numeric or not. It is numeric if it contains only numbers and only one "-" (negative sign). If no text is entered in the textbox, its text value is "". You can use If/Else selection for this.

sk8ndestroy14 commented: Thanks for the help. +7
scudzilla 32 Junior Poster

Hey all. I'm not exactly new but I'm still a newbie.:$ I'm from the Philippines. I just finished studying VB6 last semester and since then, I try to make a variety projects just to improve my skills, most especially in using API functions. So far, I enjoy staying here and helping those with simple problems. Good day to you all.

christina>you commented: welcome! -christina +5
arjunsasidharan commented: Hey godzilla welcome +1
scudzilla 32 Junior Poster

There are 10 different results. The frequency array stores the frequency of each result. For example, if the value of frequency(1) is 5, it means that out of 40 students, 5 gave a score of 1. In the code, for every student that gave a score of 1, frequency(1) will increase by one and the same for the others.

marlon ng commented: Thanks a lot! +1