We help IT Professionals succeed at work.

Menu and Forms

b001
b001 asked
on
Hi Experts
I have a form menu on clicking Bill'sSpecial
I would like to run LoginForm1 and return Passx variable
Check Passx variable if YES then run Bill_sp Form
With the follwong code
It runs LoginForm1 but it does not wait for any input there it continues
How can I stop it at LoginForm1 then execute next line

   Private Sub BillsSpecialToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BillsSpecialToolStripMenuItem.Click
        passx = ""
        LoginForm1.Show()
        If passx = "YES" Then
            Bill_sp.Show()
        End If
        MsgBox(passx)
    End Sub

Thanks
Comment
Watch Question

High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
Use ShowDialog() instead of Show():

        LoginForm1.ShowDialog()