http://www.foxtable.com/webhelp/topics/1597.htm
dim dr As Row
With Tables("生产主计划.生产BOM表")
If .TopPosition > -1 Then '如果选定区域包括数据行
For i as Integer = .TopPosition To .BottomPosition
dr = .Rows(i)
If dr.DataRow("结案") = False Then If dr.DataRow("生产单位") = "五金" Then
……
Next
End If
End With