红色这段代码有什么问题吗?这是按钮代码
If Tables("工序录入_table1").Rows.Count<2 Then
MessageBox.Show("请先导入员工!")
ElseIf Tables("工序录入_table1").Cols.Count<4 Then
MessageBox.Show("请先导入工序!")
ElseIf Tables("工序录入_table1").Cols.Count>=4 AndAlso Tables("工序录入_table1").Rows.Count>=2 Then
Dim k As Double = Tables("工序录入_table1").Rows(1)(3)
If k<=0 Then
MessageBox.Show("请输入数值!")
Else
For i As Integer =1 To Tables("工序录入_table1").Rows.Count-1
For Each dc As DataCol In Tables("工序录入_table1").DataTable.DataCols
If dc.Name<>"姓名" AndAlso dc.Name<>"工号" AndAlso dc.Name<>"单据编号" AndAlso dc.Name<>"员工编号" Then
Tables("工序录入_table1").Rows(i)(dc.Name) =k
End If
Next
Next
End If
End If
For Each r As Row In Tables("工序录入_table1").GetCheckedRows
r.Delete
Next
蓝色代码也是写在按钮事件