+ Reply to Thread
Results 1 to 4 of 4

Previous/Next button on UserForm calling to data on a hidden sheet

  1. #1
    Registered User
    Join Date
    06-08-2017
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    2

    Previous/Next button on UserForm calling to data on a hidden sheet

    Greetings -

    I am trying to build a form to update data on a hidden sheet ("Employees") but I am running into issues when coding the previous and next record buttons on the form. I have used coding found in other examples on this forum and others but keep running into issues where the form goes through records on the visible worksheet and not the hidden sheet or get a runtime error on the LastRow/CurrentRow lines. I seem to be going in circles and need some help as I am not an expert by any means.

    Below is the code I currently have on the Form.

    Everything is working except the Previous and Next buttons.


    Please Login or Register  to view this content.

    Thanks for your help!

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Previous/Next button on UserForm calling to data on a hidden sheet

    For the Previous code, you have Sheets("Employees").Select
    If the sheet is hidden, the code will give an error because it cannot select a hidden sheet. You must 1st make the sheet visible, then select it.
    As for the Next code, not sure what is going on there without seeing a sample of the code with userform etc.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    06-08-2017
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    2

    Re: Previous/Next button on UserForm calling to data on a hidden sheet

    I make the sheet visible in the UserForm_Initialize script.

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Previous/Next button on UserForm calling to data on a hidden sheet

    Sorry, somehow I missed that.

+ 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. Calling the name of the clicked button in a userform?
    By ckreitel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-25-2016, 03:42 PM
  2. [SOLVED] ActiveX button calling VBA from another hidden tab ?
    By KomicJ in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-16-2015, 09:57 PM
  3. Cmd Next/Previous button on Userform
    By atger in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2014, 04:35 AM
  4. Help on UserForm coding - displaying data from previous sheet
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2013, 07:48 AM
  5. Calling information from previous sheet
    By Terry Smith in forum Excel General
    Replies: 1
    Last Post: 03-16-2012, 04:28 PM
  6. [SOLVED] Cmd Next/Previous button on Userform
    By luke_p in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-01-2010, 04:44 AM
  7. [SOLVED] Button on Userform calling GetOpenFilename
    By Werner Rohrmoser in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2005, 04:06 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