add a button to your form, then in design view doubleclick it, + you'll navigate to a code window with this:

vb Code:
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.  
  3. End Sub

that's a button _click event for button1. put the code in there