View Single Post
Old Mar 8th, 2007, 4:11 PM   #6
zorin
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 218
Rep Power: 4 zorin is on a distinguished road
Stop telling him to learn a new language, it has nothing to do with his question and is not appriciated.
Quote:
Originally Posted by humpa View Post
Hi im relatively new to visual basic and i was wondering if anybody could help me. I'm trying to open a second form when i click a button on the first form, what is the code to do that. My programming teacher is to dumb and doesn't know how, so maybe you all could help. Thanks!
In visual basic create a button and go to the form code and add the following: "Form2.Show". Now your code should look like
Private Sub Command1_Click()
Form2.Show
End Sub
Obviously the Private Sub Command1_click() will be different if you have more than one button present on your form. Hope that helps a little.
zorin is offline   Reply With Quote