Results 1 to 6 of 6

Find Next Record Command Button

Threaded View

  1. #1
    Registered User
    Join Date
    04-29-2014
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    15

    Find Next Record Command Button

    This is a command button meant to take me to the next record that has the same value as ComboBox17. TextBox1 is just an index with all unique values that is located on the far right column of my table that I use to keep tabs on which record I am on. I had it working for a minute, but it must not have saved my changes and I can’t get it right again. The first time I press the button, everything appears to work properly, but then the second time the d value (record number) does not change.

    Do you see why that might be?

    Private Sub cmbNext_Click()
    
    With ws.Range("WIGData")
        Set d = .Find(TextBox1.Value, LookIn:=xlValues)
        Set c = .Find(ComboBox17.Value, d, xlValues)
            FirstAddress = d.Address
            Set c = .FindNext(c)
            Set d = c.Offset(0, 18)
        MsgBox d
    End With
    
    With Me
        .ComboBox15.Value = d.Offset(0, -20).Value
        .ComboBox16.Value = d.Offset(0, -19).Value
           ….
        .ComboBox18.Value = d.Offset(0, -1).Value
        .TextBox1.Value = d.Offset(0, 0).Value
    End With
    
    End Sub

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] UserForm in Excel- command button to save record
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2013, 11:50 AM
  2. Replies: 1
    Last Post: 11-16-2012, 09:25 AM
  3. Command Buttons for Viewing Record, Next Record and Previous Record
    By david1987 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2012, 06:30 AM
  4. [SOLVED] Move record to different sheet and then deleting it through a userform command button
    By dev111ski in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2012, 06:30 AM
  5. Button to find last record
    By gelandl in forum Excel General
    Replies: 2
    Last Post: 09-22-2008, 09:29 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1