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

Discussion in 'Coding' started by cliffton jhed saldavia, Jul 14, 2017.

  1. cliffton jhed saldavia

    cliffton jhed saldavia

    Joined:
    Jul 14, 2017
    Likes Received:
    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
     
    cliffton jhed saldavia, Jul 14, 2017
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Madxgraphics

    Captcha Codes

    Madxgraphics, Sep 1, 2008, in forum: Coding
    Replies:
    3
    Views:
    1,058
    Madxgraphics
    Sep 2, 2008
  2. Kabirch
    Replies:
    1
    Views:
    1,880
    knight00779
    Jun 29, 2009
  3. Shanrattimnoso

    Virtual Key codes

    Shanrattimnoso, Jul 10, 2009, in forum: Coding
    Replies:
    3
    Views:
    3,577
    muckshifter
    Jul 10, 2009
  4. ja28226
    Replies:
    2
    Views:
    4,072
    ja28226
    Jan 26, 2011
  5. antwon.maxwell
    Replies:
    0
    Views:
    2,433
    antwon.maxwell
    Mar 24, 2011
  6. Thanx

    Data display on userform

    Thanx, May 16, 2011, in forum: Coding
    Replies:
    0
    Views:
    897
    Thanx
    May 16, 2011
  7. Ollie
    Replies:
    0
    Views:
    915
    Ollie
    Jul 9, 2015
  8. Michael Thomas
    Replies:
    2
    Views:
    363
Loading...