Hi Guys,

I am trying to split a string of integers but I keep getting this error:
Index was outside the bounds of the array.

Here is my code:

VB Code:
  1. Public Shared Function picastopoints(ByVal sTemp)
  2.         'For example sTemp could equal 6p10
  3.  
  4.         Dim whole, remainder, convert, strInt
  5.         whole = Split(sTemp, "p", -1, 0)
  6.         strInt = whole(0)
  7.         remainder =whole(1)
  8.         convert = strInt * 12000 + remainder * 1000
  9.         Return convert
  10.     End Function

Please Please Help..I dont know what I am doing wrong..

Thanks!