For i = 0 To Binding_sale_sale.Count - 1
If tex_sale_check_blno.Text = blno Then
MsgBox("该销售单号已经存在,请更改")
Label1.ForeColor = Color.Red
Return
End If
Binding_sale_sale.MoveNext()
Next
用return命令可以中止当前程序的运行,退出到这段程序运行前的状态。