VB.Net Close two forms at once
<p>Kinda new to Visual Mode and need to get this simple thing to work for my coursework project.                                                     </p>

<p>The desired outcome is when the user tries to exit Form2, another form (FormCheck) will open asking the user if they are sure they want to leave, if they pick yes then both Form2 and FormCheck will close and Form1 will open. However when I try and do this, FormCheck will close and Form1 will open however Form2 will stay open behind Form1.</p>

<p>Here is my code:</p>

<pre><code>Private Sub btnYes_Click(sender As Object, e As EventArgs) Handles btnYes.Click
        Dim NewForm As Form1
        NewForm = New Form1
        NewForm.Show()
        NewForm = Nothing
        Me.Close()
        Form2.Close()
</code></pre>

<p>As I said still new so would help if answer is as basic as possible.
Thank you in advance!</p>