title: Visual basic writing smallest number program
body: <p>I'm new to visual basic and I'm trying to write a program to determine the smallest number out of three. Every time I run the program it doesn't pull up the message box.  This is what I have so far:</p>
  
  <p>Public Class Form1</p>
  
  <pre><code>Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  
      Dim TextBox1 As Integer
      Dim TextBox2 As Integer
      Dim TextBox3 As Integer
  
      TextBox1 = Val(TextBox1)
      TextBox2 = Val(TextBox2)
      TextBox3 = Val(TextBox3)
  
      If TextBox1 &lt; TextBox2 And TextBox1 &lt; TextBox3 Then
          MessageBox.Show(TextBox1)
  
  
      End If
  
  
  
  End Sub
  </code></pre>