Hi!
The first problem is that sometimes people can read minds.
For the compilers it will take some decades.
The second is: No Sum output.
Insert in line 55:
ShowMessage (IntToStr(sum));
The third problem is:
If you don't insert something in the stringgrid it is useless.
You can delete it.
If that's all not the right answer to the unasked question,
my abilities as mind reader are at the end.
Winni