Put a breakpoint within DataCalculate and go step by step, find option "step into" in your debugger (it is F11 if you're using Visual Studio)...
Dim testarray() As String = Split(files(ctr), ",", )
ti(ctr) = testarray(0)
Not sure why you have empty space behind second comma in the split, but you're definitely accesing testarray (0) without checking if it has elements (it should have the first, but then you're following with
GetValuesPerChannel(testarray(division), division)
This part is by no means guaranteed: - check the length of testarray after split.
testarray(division) <-- you probably have a file with less then division commas.