Is this not the correct way to do this? I get an error with it but if I change it to only one value then it works.
Code:If dt2.Rows(0)("STATUS") = "COMP" Or "CLOSE" Or "CAN" Or "INCOMP" Or "WAPPR" Then
dt.Rows(currentRow).Delete()
End If
Printable View
Is this not the correct way to do this? I get an error with it but if I change it to only one value then it works.
Code:If dt2.Rows(0)("STATUS") = "COMP" Or "CLOSE" Or "CAN" Or "INCOMP" Or "WAPPR" Then
dt.Rows(currentRow).Delete()
End If
Code:If dt2.Rows(0)("STATUS") = "COMP" _
Or dt2.Rows(0)("STATUS") = "CLOSE" _
Or dt2.Rows(0)("STATUS") = "CAN" _
Or dt2.Rows(0)("STATUS") = "INCOMP" _
Or dt2.Rows(0)("STATUS") = "WAPPR" Then
Code:Select Case dt2.Rows(0)("STATUS")
Case "COMP", "CLOSE", "CAN", "INCOMP", "WAPPR"
dt.Rows(currentRow).Delete()
End Select
You might want to change those Or's to OrElse.