我这样测试
With Tables("订单选择商品_table1") For i As Integer = 0 To .Rows.Count -1 If .rows(i)("订单号")<>"" And .rows(i)("生产是否完成")=False Then For Each c As Col In .Cols .SetHeaderCellBackColor(c.Name,Color.Cyan, i+1) Next End If NextEnd With