How to open a new form and close existing one.

  • Thread starter Thread starter Kurt
  • Start date Start date
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.
 
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.
 
Back
Top