Hello All,
I am trying to use PREV and NEXT buttons on userform to increment row and fill the userform. When the PREV button is pressed it goes back one record and populates the form. However, when pressed again it does nothing. Any help is appreciated.
HTML
Private Sub cmdPrev_Click()
Dim currentRow As Long 'Variable to hold row number
'Initialize the row where the cell was clicked
currentRow = ActiveCell.Row - 1
'Enables sheet row highlighting
Range("AA2").Value = currentRow
'Disables button at second row
If currentRow = 1 Then
Me.cmdPrev.Visible = False
End If
With Me
.txtRecdDate = Cells(currentRow, 1)
.txtTrackingNumber = Cells(currentRow, 3)
.txtFileNumber = Cells(currentRow, 5)
.txtClient = Cells(currentRow, 7)
.txtLocationSource = Cells(currentRow, 8)
.cboAuthType = Cells(currentRow, 9)
.cboOffice = Cells(currentRow, 10)
End With
End Sub
Display More