Assuming there’s only 1 item to be removed you can add an exit. This will skip the rest of the loop when the first item is found and removed.
For i As Integer = moveis.LastIndex DownTo 0
If moveis(i).xyz=true Then
moveis.Removeat(i)
Exit For i // If there's more than one to remove then delete this line
End If
Next
IndexOf typically works with arrays of intrinsic types (such as Single, Double, String etc). The “moveis(i).xyz” would suggest that this is an array of class instances. IndexOf would likely be able to search for the index of the instance of a class as a whole (ie which element of the array holds a reference to this class instance), it cannot search for one where a specified property is of a given value.
Var list() As Class1
Var a As New Class1
Var b As New Class1
list.Add(a)
list.Add(b)
System.DebugLog list.IndexOf(a).ToString
System.DebugLog list.IndexOf(b).ToString