+ Reply to Thread
Results 1 to 8 of 8

Select a sheet when tabs not visible

  1. #1
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Select a sheet when tabs not visible

    I've developed an app for our call center managers to use for evaluating and scoring employee calls from customers. It has several worksheets in the background, and the main form (worksheet) used for scoring the calls. The other sheets aren't hidden, but I have the tabs not visible, so they are effectively inaccessible to the users. I've added a button to the form for them to produce a list of all scores for all employees. I'm creating the list on a "ScoreList" sheet, with a "Back" button to get back to the main form.

    It works fine when I have tabs visible, but when not, the line, Sheets("ScoreList").Select gets "Select method of worksheet class failed". If I change it to Sheets("ScoreList").Activate, the code apparently runs and builds the list, but it doesn't activate the sheet, so it looks like nothing happens.

    If I put in a debug stop, it tells me that the active sheet is ScoreList, but the display is blank, and when I let the code finish, it goes back to the form.

    How do I show another sheet when tabs aren't visible?
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Select a sheet when tabs not visible

    try selecting a cell in the scorelist instead of only the sheet

    so
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Select a sheet when tabs not visible

    That gets "Select method of range class failed".

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,613

    Re: Select a sheet when tabs not visible

    Must be something to do with the interaction with the form. There's no reason why you can't select a sheet just because the tab isn't visible.

    This example is in the Immediate Window:

    Please Login or Register  to view this content.
    All that said, you don't need to select anything in order to manipulate it.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Select a sheet when tabs not visible

    Well ... it turns out I lied. The sheets are hidden after all, so that explains it. Sorry for the confusion, and thanks for the replies.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,613

    Re: Select a sheet when tabs not visible

    You're welcome.


    Well, you still don't need to select anything in order to manipulate it.

    And it would be more efficient if you didn't. But, your choice.





    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  7. #7
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Select a sheet when tabs not visible

    No, but you do need to select it to show them the report

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,613

    Re: Select a sheet when tabs not visible

    Fair enough, if that's what you're doing.

+ 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. Select visible range and add page break after every 20th visible cell
    By tuc47285 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-04-2015, 01:18 AM
  2. Replies: 4
    Last Post: 01-06-2014, 02:14 AM
  3. [SOLVED] Need Code to Select Next Visible Sheet
    By mo4391 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-11-2013, 07:14 PM
  4. Tabs always visible
    By CornCrib in forum Excel General
    Replies: 2
    Last Post: 02-02-2012, 03:11 PM
  5. Replies: 6
    Last Post: 02-01-2012, 05:29 PM
  6. Macro to select the first unlocked visible cell when a sheet is activated
    By gazza365 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2011, 02:01 AM
  7. [SOLVED] Select sheet tabs in workbook & save to separate workbook files
    By stratocaster in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2006, 11:40 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