Hi,
In my project I have a filelistbox which has the property multiselect on extended.
When I run the program and I select a few files, i get the following error :
'run-time error 381 : invalid property array index'
For intCounter = 0 To filFile.ListCount-1
If filFile.Selected(intCounter) = True Then
DoEvents
filFile.ListIndex = intCounter 'error appears
strflnm = dirFolder.Path & "\" & filFile.FileName
ExecScripts (strflnm)
end if
Next intCounter
Everything works until the counter arrives at the first item selected in the list. At that moment, the listindex has the value of the last selected item in the list. When I try to assign another value (index from the first selected item) it gives the error. Does somebody know what is happening here ?!?
Thanks in advance!
In my project I have a filelistbox which has the property multiselect on extended.
When I run the program and I select a few files, i get the following error :
'run-time error 381 : invalid property array index'
For intCounter = 0 To filFile.ListCount-1
If filFile.Selected(intCounter) = True Then
DoEvents
filFile.ListIndex = intCounter 'error appears
strflnm = dirFolder.Path & "\" & filFile.FileName
ExecScripts (strflnm)
end if
Next intCounter
Everything works until the counter arrives at the first item selected in the list. At that moment, the listindex has the value of the last selected item in the list. When I try to assign another value (index from the first selected item) it gives the error. Does somebody know what is happening here ?!?
Thanks in advance!