SubString2 uses two parameters, BeginIndex and EndIndex. EndIndex should not be smaller than BeginIndex but if I look at your posted debug information, the values are
BeginIndex = loFirstByte = 46
EndIndex = loNumBytes = 44
I haven't looked closer to your project but I think line 202 should be corrected to
lcData = lcWorkData.SubString2(lcFirstByte, lcLastByte)
or
lcData = lcWorkData.SubString2(lcFirstByte, lcLastByte + 1)
to include the last byte.
specci48