Help With WriteList

cnicolapc

Active Member
Licensed User
Longtime User
Hi,
When you write in WriteList, it must be done sequentially?
For example:
I have to write certain lines only if a condition is true, but an error is generated. (Invalid Index 7, size is 0).

Select VMateriale
Case 0
List3.InsertAt (0, ED1.text)
List3.InsertAt (1, Ed2.text)
List3.InsertAt (2, Ed3.text)
List3.InsertAt (3, Ed4.text)
List3.InsertAt (4, ed5.text)
List3.InsertAt (5, ed6.text)
List3.InsertAt (6, ed7.text)
Case 1
List3.InsertAt (7, ED1.text)
List3.InsertAt (8, Ed2.text)
List3.InsertAt (9, Ed3.text)
List3.InsertAt (10, Ed4.text)
List3.InsertAt (11, ed5.text)
List3.InsertAt (12, ed6.text)
List3.InsertAt (13, ed7.text)

End Select

File.WriteList (File.DirRootExternal, "OPCostiacc.txt" list3)
What solution can I use?
Thanks
 
Top