You need to remove any empty string in the split function... Otherwise you'll get an exception when you try to parse an empty string.
So chnge this line
VB Code:
  1. Dim Frame_temp() As String = Frame_order.Split(" "c)
To this then you should be all set
VB Code:
  1. Dim Frame_temp() As String = Frame_order.Split(" ".ToCharArray, StringSplitOptions.RemoveEmptyEntries)