i used vs 2008 .. i'm building a windows form application in vb.net i need help that ......... if i exit sub * check_fill_for_New () * using
EXIT SUB and then in * bt_Ok_Click * sub does not start msgbox ...... but it also EXIT in half
Public Sub check_fill_for_New()
If tb_UserName.Text = "" Then
MsgBox("Please Insert User Name Field", MsgBoxStyle.OkOnly, "Error")
tb_UserName.Focus()
Exit Sub
End If
End Sub
Private Sub bt_Ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_Ok.Click
If maintain_department = "Admin" Then
Call check_fill_for_New()
MsgBox("nooooooooo")
End If
End Sub
source
share