+ Reply to Thread
Results 1 to 12 of 12

Pulling next item in a list

  1. #1
    Registered User
    Join Date
    12-05-2010
    Location
    LA, CA
    MS-Off Ver
    Excel 2010
    Posts
    59

    Pulling next item in a list

    Hi,
    I'm trying to create a macro that can pull the next item in a list or the item before. For example, in the attachment, in D2, we have A, but if click "Next", it'll jump to "B" and return "2" in D4. Additionally, we hit "back," it'll go back to "A" again.

    As always, thank you so much for the help!

    sample.xlsx
    Last edited by janeml; 01-23-2014 at 06:06 PM.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Pulling next item in a list

    Something like this?
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Pulling next item in a list

    try this code ,


    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  4. #4
    Registered User
    Join Date
    12-05-2010
    Location
    LA, CA
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Pulling next item in a list

    Hi,
    Yes, that's the code I'm looking for. However, since it's a private sub code, how do I place it into my actual workbook and have it work?

    Thanks!

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Pulling next item in a list

    remove the word private from the code

  6. #6
    Registered User
    Join Date
    12-05-2010
    Location
    LA, CA
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Pulling next item in a list

    the code doesn't work if i remove the "private"

  7. #7
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Pulling next item in a list

    you have assign the sub procedure to the icon. Easier if you attach your working file.

  8. #8
    Registered User
    Join Date
    12-05-2010
    Location
    LA, CA
    MS-Off Ver
    Excel 2010
    Posts
    59

    Unhappy Re: Pulling next item in a list

    Quote Originally Posted by JieJenn View Post
    you have assign the sub procedure to the icon. Easier if you attach your working file.

    Hi JieJenn,.
    I assigned the sub procedures to the icons. I'm tryin gto upload a clean copy of the working file, but it's too big

  9. #9
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Pulling next item in a list

    Don't know how to help you. Can you just attach a sample of what you've done?

  10. #10
    Registered User
    Join Date
    12-05-2010
    Location
    LA, CA
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Pulling next item in a list

    Hi Jiejenn,
    I had to strip all the hidden tabs. The icons are in "tech_detail" and the list of names are in "q5_report"

    Tech_Performance_Dashboard_jl.xlsm

  11. #11
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Pulling next item in a list

    Move your declaration of variable to the top

    Dim rngData As Range
    Dim f As WorksheetFunction
    Attached Files Attached Files
    Last edited by JieJenn; 01-23-2014 at 05:51 PM. Reason: Adding Attachment

  12. #12
    Registered User
    Join Date
    12-05-2010
    Location
    LA, CA
    MS-Off Ver
    Excel 2010
    Posts
    59

    Wink Re: Pulling next item in a list

    Quote Originally Posted by JieJenn View Post
    Move your declaration of variable to the top

    Dim rngData As Range
    Dim f As WorksheetFunction
    Thank you thank you thank you!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with VBA, find Item from list then sum totals of each item by type
    By HR_GUY in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-30-2013, 01:30 PM
  2. Replies: 0
    Last Post: 08-28-2012, 09:44 PM
  3. Replies: 8
    Last Post: 01-23-2012, 10:28 AM
  4. Taking the next item in a list into 1 of 2 tables based on the previous item time
    By SoleAris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2011, 04:59 PM
  5. linking a list item or text item in a user form to a worksheet
    By ravergirl7216 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-03-2010, 03:43 AM

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