problem with visualbasic 2010 coding

Private Sub Button1_Click(ByVal sender As Object, ByVal _e As EventArgs) Handles Button1.Click
        If Button1.Text = "Close" Then    ' will fail it button's text is " Close" (notice the extra space)
            SerialPort1.Close()
            Button1.Text = "Open"
        Else
            If Not SerialPort1.IsOpen Then SerialPort1.Open()    ' where is endif ?

            Button1.Text = " Close"    ' one extra space!

        End If
    End Sub

Where do you set the port options (baud rate, etc. ?).