For i As Integer = .TopPosition To .BottomPosition Dim r As Row = .Rows(i)
改成
For Each r As Row in .GetCheckedRows