以下是引用lin_hailun在2012-11-22 14:10:00的发言: 方法一:Syscmd.Row.Delete()
方法二:
For i As Integer = Tables("").ButtonRow To Tables("").TopRow
Tables("").Rows(i).Delete
Next
[此贴子已经被作者于2012-11-22 14:10:18编辑过]
偶尔看到以上的回答!试了一下,方法一是对的
方法二:应该bottom,且要加上 step -1
For i As Integer = Tables("").BottomRow To Tables("").TopRow step -1
Tables("").Rows(i).Delete
Next
或直接:
For i As Integer = Tables("").BottomRow To Tables("").TopRow step -1
Tables("").current.Delete
Next
或直接:
For i As Integer = Tables("").TOPROW To Tables("").BOTTOMROW
Tables("").current.Delete
Next
或直接:
With Tables("")
For i as Integer = .TopPosition To .BottomPosition
.current.delete
Next
End With