+ Reply to Thread
Results 1 to 33 of 33

Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

  1. #1
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Hello there, I have too many tabs/worksheets to scroll effectively through so I wanted to create a contents page with links in rows instead. This also enables me to add descriptions of what is in each of the worksheets.

    It works fine if I have the worksheets visible, but I want to stop there being any confusion so I want to hide all the worksheet tabs linked in the contents worksheet, but still being able to access the worksheets.

    Could someone please confirm if this is possible without coding or does this need to be done as a macro/code?
    Last edited by ThiaJay; 08-07-2020 at 04:59 AM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    This would require VBA coding.
    Do you know the following tips for maneuvering through sheet tabs?
    1. CNTRL PageUP or PageDwn to move from sheet to sheet
    2. Cntrl + Click on scroll arrows (lower right) to move the tabs to show last (or first) sheet
    3. Right click on the scroll arrows to bring up the list of all sheets. You can then select which sheet to travel to.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208
    Quote Originally Posted by ChemistB View Post
    This would require VBA coding.
    Do you know the following tips for maneuvering through sheet tabs?
    1. CNTRL PageUP or PageDwn to move from sheet to sheet
    2. Cntrl + Click on scroll arrows (lower right) to move the tabs to show last (or first) sheet
    3. Right click on the scroll arrows to bring up the list of all sheets. You can then select which sheet to travel to.
    Thanks for your reply. I didn't, but then again that won't make it easier for others who will not remember that nor will it really help them know what is on each page. The contents page is great because it contains descriptions of what is contained too.

    Does anyone know what code would be involved to be able to view a hidden worksheet called "Local Contacts"?

  4. #4
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Just checking that this has been seen.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Add code to Thisworkbook module.

    Please Login or Register  to view this content.
    On the Table of contents sheet you would need to insert hyperlinks, not HYPERLINK formula.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  6. #6
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Thanks Andy, I did that originally (inserting hyperlinks via the menu rather than formula) but it's not working.

    How would we ensure that Sheet1 (Called 'Search') and Sheet8 (Called 'Contents') were always visible?

    Did you hide all the other sheets once you inserted the code into 'ThisWorkbook'?

    Please Login or Register  to view this content.
    Debug doesn't like this line:
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Ah, thank you.

    The problem was the order, I missed that.

    Is there a way to make this work by making the hidden sheets hidden just by changing to the "Search" or "Contents" tab rather than clicking on a hyperlink? I don't have space in the top cells.

    Please Login or Register  to view this content.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Stick code in the worksheet activate event to hide other sheets.

  9. #9
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Thanks Andy.

    Is there a way to make this work by making the hidden sheets hidden just by changing to the "Search" or "Contents" tab rather than clicking on a hyperlink? I don't have space in the top cells.

    Also, how would we ensure that Sheet1 (Called 'Search') and Sheet8 (Called 'Contents') were always visible?

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Yes I just suggested adding code to the activate events of the search or contents sheet.

    Add code to test whether the sheet tab has a name that should be kept unhidden

    As always it would make things a lot clear to us if you posted example workbook. You keep on referencing things we have not had sight of

  11. #11
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Sorry Andy, here you go.
    Attached Files Attached Files

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    See Thisworkbook SheetActivate event for the code.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    That's totally awesome, thank you. The only thing that isn't working is avoiding searching through the contents page with the code updated?

  14. #14
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Your code already ignores the Search sheet so you should be able to add code to ignore the contents sheet.

  15. #15
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    I tried to quote code but the website firewall said I was trying to inject code, so I will post it as an image.

    Gb5h26Q.png

  16. #16
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    I meant you have code in your search routine that excludes

    Please Login or Register  to view this content.

  17. #17
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    If I insert an extra line, it breaks:

    Please Login or Register  to view this content.

  18. #18
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    That is because that is not how you add additional tests to the IF statement.


    Please Login or Register  to view this content.

  19. #19
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Thank you Andy, I did not realise. That's really helpful and gives me a better insight.

  20. #20
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    I've noticed a problem now. If a hyperlink is introduced that is external and clicked, such as for an email address or external workbook, the code in ThisWorkbook isn't happy.

    Please Login or Register  to view this content.
    Specifically

    Please Login or Register  to view this content.
    Run-time error '1004':

    Method 'Range' of object '_Global' failed.

  21. #21
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Then add code to check subaddress or use error trapping

  22. #22
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Hello Andy, thank you for your reply.

    I'm not sure how/what I would need to input to check the subaddress.

  23. #23
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Did you write any of that code, you seem to be struggling with VBA coding? I only ask as it would be helpful to those trying to help you if we understood your level of VBA knowledge.

    Try this
    Please Login or Register  to view this content.

  24. #24
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Thank you Andy. It's obvious now that you overestimated my abilities, I have either manipulated code or added it based on your support and that or someone on the other thread.

    What you have said does work.

    I've noticed that the hyperlinks that used to work on the search page for any results that come up and take the user to the relevant worksheet and cell don't work now. It's likely this is to do with the relevant worksheet being hidden. I'm not sure what the difference is between the links on the contents page and those produced by the code on the search page?

  25. #25
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Attach a workbook with an example of non worksheet link, it maybe different to the test one I tried and based the code on

  26. #26
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    But the non worksheet link works as you expected. It's the links generated by the search code on the Search tab that don't work since all the modifications have been made to hide worksheets (and those are links to cells on hidden worksheets within the same workbook).

  27. #27
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    All I can say then is works for me. Without seeing exactly what you are dealing with I can not help.

  28. #28
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Have you tried searching on the Search tab for "test" and then clicking on the links in the left column?

  29. #29
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    The followhyperlink checks the sheet name and was only working for Contents.
    If you also want the Search tab to work you need to test that sheet name.

    Please Login or Register  to view this content.

  30. #30
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Thank you, that does work

    Please Login or Register  to view this content.

  31. #31
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    It's working well, even if the user saves the workbook on one of the hidden worksheets, when the worksheet is opened up again it hides that sheet and the active sheet is either Search or Contents. How do I force the view to revert to Search only? Even if the workbook is saved on the Contents page please?

  32. #32
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    add code to the Thisworkbook Workbook_Open event to activate the required sheet

  33. #33
    Forum Contributor
    Join Date
    11-08-2014
    Location
    UK
    MS-Off Ver
    Office 2013
    Posts
    208

    Re: Creating a contents page with hyperlinks that take the user to hidden worksheet tabs

    Thanks Andy.

    Please Login or Register  to view this content.

+ 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. Hyperlinking to hidden tabs - hidden tabs unhide / hide automatically.
    By jexcelio in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-31-2016, 02:42 AM
  2. [SOLVED] trying to access the excel sheets/Tabs in the hidden/very hidden mode through hyperlinks
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-30-2013, 06:50 AM
  3. Replies: 1
    Last Post: 08-26-2013, 07:44 PM
  4. [SOLVED] How to use macros to open hidden tabs from a master worksheet?
    By Jon Gray in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2013, 03:30 PM
  5. Creating New Page with Popup but original page is hidden
    By smojosis in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-02-2013, 03:03 PM
  6. [SOLVED] Creating a List of Worksheet Tabs in a workbook as a "Contents Page"
    By Chris Hankey in forum Excel General
    Replies: 2
    Last Post: 07-15-2012, 06:36 PM
  7. Creating a contents page?
    By garyi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-11-2011, 08:36 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