title: VB .net Change text of selected textbox on button click
body: <p>I have 10 buttons and I want to click on a button so it changes text of the focused textbox and switch to next textbox.
   i tried this:</p>
  
  <pre><code>Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      TextBox1.Focus()
  End Sub
  Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
      If TextBox1.Focus Then
          TextBox1.Text = "1"
          TextBox1.Enabled = False
          TextBox2.Focus()
          TextBox2.Enabled = True
      End If
      If TextBox2.Focus Then
          TextBox2.Text = "1"
          TextBox2.Enabled = False
          TextBox3.Focus()
          TextBox3.Enabled = True
      End If
      If TextBox3.Focus Then
          TextBox3.Text = "1"
          TextBox3.Enebled= False
          TextBox4.Focus()
          TextBox4.Enabled = True
      End If
  End Sub
  </code></pre>
  
  <p>But it writes the value in every textbox instead of just going to the next textboxt </p>