title: Sort an entire row using excel VBA
body: <p>I am creating a client register where clients can be added using a button. I also have a sort function that allows me to sort them on <strong>klantnr</strong>. But the problem is whenever I use the sort function it only sorts <strong>klantnr</strong> and the added information provided from the form keeps in place. For example, this is my userform: </p>
  
  <p>(<a href="http://puu.sh/cw94k/ebf4510a24.png" rel="nofollow">http://puu.sh/cw94k/ebf4510a24.png</a>)</p>
  
  <p>And this is my excel sheet:</p>
  
  <p>(<a href="http://puu.sh/cw9nc/3a8e19a989.png" rel="nofollow">http://puu.sh/cw9nc/3a8e19a989.png</a>)</p>
  
  <p>When I add another row it sorts <strong>klantnr</strong> but it doesn't take the other values, such as <strong>Naam</strong> and <strong>Adres</strong> with it. So it needs to sort <strong>klantnr</strong> and take the other information with it</p>
  
  <p>This is my code:</p>
  
  <pre><code>Private Sub btn_Toevoegen_Click()
     Dim laatsteKlantNummer As Integer
  
  Range("B4:B13").End(xlDown).Select
  laatsteKlantNummer = ActiveCell.Value
  ActiveCell.Offset(1, 0).Value = txtKlant + 0
  ActiveCell.Offset(1, 1).Value = txtNaam
  ActiveCell.Offset(1, 2).Value = txtAdres
  ActiveCell.Offset(1, 3).Value = txtWoonplaats
  ActiveCell.Offset(1, 4).Value = txtContact
  Me.Hide
  Range("B4:B13").Sort Key1:=Range("B4:B13"), Order1:=xlAscending
  End Sub
  </code></pre>