Need Prev and Next codes for my Userform.Based on file only.

Joined
Jul 14, 2017
Messages
1
Reaction score
0
I have an .xlsm file.I need only the Prev and Next button.You can create a button for the next and prev but based on the file only.
2 examples are enough.

This is the cod that i've been using to pull up the Employees Info

Private Sub TextBox1_Change()
Find = Val(Me.TextBox1.Value)
c = Application.WorksheetFunction.CountIf(Sheet1.Range("B:B"), Find)
If c = 0 Then
EMPNO.Text = ""
QIDNO.Text = ""
LNAME.Text = ""
Exit Sub
End If
On Error Resume Next
r = Application.WorksheetFunction.Match(Find, Sheet1.Range("B:B"), 0)
Me.EMPNO.Value = Sheet1.Range("B" & r).Value
Me.QIDNO.Value = Sheet1.Range("C" & r).Value
Me.LNAME.Value = Sheet1.Range("D" & r).Value
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top