I have got menu bar.
In that there is Logout option also.
When the user clicks on Logout then it should pop up the msg that "successful logout" and close the current page and redirect to login form.
I wrote this code:

    MsgBox("Logout Successful")
    Form1.TextBox1.Text = ""
    Form1.TextBox2.Text = ""

Form1 is login form.
Is there anything wrong in this?
This code is working fine for 1 form but not for other form.

here is an anology :
i have two form, LoginForm and MainForm

when user success login :

LoginForm.Visible = False

and when user logout :

LoginForm.Visible = True

hope give you some imagination.