Dim i As Integer = 0
'With Tables("员工表")
With Tables("学员表")
For Each rrrr As Row In .Rows '当前加载已筛选过的员工表中,每一行都去核对
Dim mmmm As String = .current("培训号")
If xyjh.Contains(mmmm) = True Then '找出员工表中已经加入学员表的学员,下一句remove掉
.current.Remove
i = i + 1
End If
Next
End With
Output.show(i)
问题出现在最后这个循环语句中,没有将符合条件的所有行移除,而是跳行移除。每次只移除1、3、5、7、9……