How to open a new form and close existing one.

K

Kurt

Can someone tell me the correct way of closing one form from one of its buttons and opening another one?
Example: Form17 is up and one of the buttons is pressed with code;
If A = B Then
Form1.Show()
Form17.Close()
End If
But this coding does not work.
 
K

Kurt

Again, please don't just write "does not work". You need to be specific and precise. You cannot expect anyone to help you if you don't take the timeto write a clear question.
--------------------------------------------------------------------------------
Example: Form17 is up and one of the buttons is pressed with code;
If A = B Then
Form1.Show()
Form17.Close()
End If
But this coding does not work.

When using the code as written aboce I get the error
“Make sure you have not released a resource before attempting to use it.”
Can you try and tell me how to understand this error?
thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top