1 (edited by Ansel 2026-02-25 10:36:25)

Topic: Procedure

Good morning everyone. I have a procedure

(Procedure Totali2(Sender: TObject; Action: string);

If I call it with the OnShow event of the form1 function.

If I call it from a script, e.s.

Totali2(form1.TableGrid2,'');

it gives me the error "List index out of bounds (0)".

I've tried various parameters but can't resolve the issue.
I'd appreciate any help. Thanks.

2 (edited by Ansel 2026-02-25 11:06:46)

Re: Procedure

Error  is here...An equal part but on TableGrid1 it doesn't cause problems...

Post's attachments

Attachment icon Immagine 2026-02-25 113455.jpg 54.38 kb, 5 downloads since 2026-02-25 

Re: Procedure

The error indicates that in your loop the variable "i" is out of bounds (number of rows) or the value of columns (3) in Cell[3, i] exceeds the number of columns.