Excel VBA userform next and previous + first and last entry
<p>How can it be difficult to add buttons showing previous and next entries on the userform? There is a bunch of source on the net. I've tried many of them but no go. I have tried to adapt one of the solutions mentioned in this very site, I failed. :( </p>

<p>In the column A there are item numbers (say 180) It may be according to 180 or to as long as it gets. I want to add the previous and next buttons. Then buttons to show the first and last entry.</p>

<p>My code is:</p>

<pre><code>Private Sub UserForm_Initialize()

Dim k As Long, j As Long
Dim rng As Range
Set rng = Worksheets("BİLGİLER").Range("A180")

k = 0: j = 1

vyakinligi.Value = rng.Offset(k).Value
vadsoyad.Value = rng.Offset(k, j).Value: j = j + 1
vmeslegi.Value = rng.Offset(k, j).Value: j = j + 1
visadresi.Value = rng.Offset(k, j).Value: j = j + 1
vceptel.Value = rng.Offset(k, j).Value: j = j + 1

End Sub

'~~&gt; Next Button
Private Sub CommandButton7_Click()
k = k + 1: j = 1

If k &gt; (Sheets("BİLGİLER").Rows.Count - 4) Then
    MsgBox "Max rows Reached"
    Exit Sub
End If

vyakinligi.Value = rng.Offset(k).Value
vadsoyad.Value = rng.Offset(k, j).Value: j = j + 1
vmeslegi.Value = rng.Offset(k, j).Value: j = j + 1
visadresi.Value = rng.Offset(k, j).Value: j = j + 1
vceptel.Value = rng.Offset(k, j).Value: j = j + 1

End Sub


'~~&gt; Previous Button
Private Sub CommandButton8_Click()
k = k - 1: j = 1

If k &lt; 0 Then
    MsgBox "1st Row Reached"
    Exit Sub
End If

vyakinligi.Value = rng.Offset(k).Value
vadsoyad.Value = rng.Offset(k, j).Value: j = j + 1
vmeslegi.Value = rng.Offset(k, j).Value: j = j + 1
visadresi.Value = rng.Offset(k, j).Value: j = j + 1
vceptel.Value = rng.Offset(k, j).Value: j = j + 1

End Sub
</code></pre>

<p>Where did I go wrong? What should I do to add the buttons and show previous, next, first and the last entry on the userform?</p>