Hello I'm pretty new at visual basic and I can't seem to figure out how to switch between forms.. I want to be able to click a Next button and proceed to my other form. any helps or hints would be appreciated.
Printable View
Hello I'm pretty new at visual basic and I can't seem to figure out how to switch between forms.. I want to be able to click a Next button and proceed to my other form. any helps or hints would be appreciated.
Put this into the Command button:
replace formname with the name of that form.Code:formname.show
thanks alot
Well now i have another question I want the other form to close when the other opens..
I figure you would just say Form1.Close() or Me.Close() but this closes all the forms.. how can i change that
I think .... =/Code:hide.me
or try
Code:formname.hide
That will not close the form, but simply hide it - which uses (and perhaps wastes) memory, and may stop the program from closing when it is finished.
Unless you have a particular reason for keeping it open, you should unload it:
or:Code:Unload Me
..and that should be followed by Exit Sub (or Exit Function etc as apt) so that you don't accidentally re-load it.Code:Unload Form1
There is no pre-made .Close method, so that is something you have written yourself.
Why not stay with just one form and switch between frames on that form (like a wizard does)?