呃,排序的状态下,不能插入行的。
要不你先保存排序,然后再插入
For Each r As Row In Tables("表A").rows r.DataRow.baserow("_Sortkey") = r.indexNext
Tables("表A").Sort = ""Dim n As Integer = Tables("表A").Position
Dim nr As Row = Tables("表A").AddNewnr.Move(n+1)