Dim sf As JStringFunctions 'in Process_Globals, maybe the use of this lib causes the problem
'......
'extract the items of this string to a list
Lgpgsv1.Initialize
Lgpgsv1= sf.Split(newstr,",") 'splitt all items into a list
If Lgpgsv1.Size < 20 Then Lgpgsv1.Add("0") 'uphere I got the error
'--------------------------------------
'I did a workaround like this:
'extract the items of this string to a list
Lgpgsv1.Initialize
Lgpgsv1= sf.Split(newstr,",") 'splitt all items into a list
If Lgpgsv1.Size < 20 Then newstr = newstr & "0"
Lgpgsv1.Initialize 're-initialize
Lgpgsv1= sf.Split(newstr,",") 'again splitt all items into a list