+ Reply to Thread
Results 1 to 8 of 8

How to activate and hide a cell when hyperlink is clicked?

  1. #1
    Registered User
    Join Date
    04-13-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2008
    Posts
    28

    How to activate and hide a cell when hyperlink is clicked?

    Dear Pros,

    I am confused. I have a final thing to do in my program. I have lists of components "Component 1" "Component 2" etc... the list are basically worksheets which contain all types of specs regarding their component (example: Component 1 [sheet] has over 100 specs of component 1...).

    With that being said, I just want 1 sheet to show in my list which contains a list of all components. I have the following function in 1 cell which fetches the name. It works perfectly.

    =IF(ISERROR(INDIRECT(ADDRESS(4,2,1,FALSE,"Component "&ROW($A2)),))=TRUE,"",HYPERLINK("[Components collection.xlsm]"&ADDRESS(3,2,1,FALSE,"Component "&ROW($A2)),INDIRECT(ADDRESS(3,2,1,FALSE,"Component "&ROW($A2)),)))

    My issue though is that the hyperlink can't open the sheet if i hide it. In order to open it, I need to unhide it, click the hyperlink, then hide it again when I see the specs or make changes. I want to hide it because I will get over 100 components and I don't want to have over 100 tabs. I just want 1 tab.

    The question is therefore:
    1) How can I automatically activate and unhide the page when component name in the list (cell) is clicked (taking in mind that the hyperlink in the cell given above also fetches the name of the component in the component sheet).
    2) How can I automatically hide the sheet when I switch out of it? It is tricky because I have over 100 components with sheet names that are "Component 1", ..., "Component 100",... etc.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: How to activate and hide a cell when hyperlink is clicked?

    I understand the need for "100" worksheets, and not having the slightest idea what your data looks like, this may be totally off the mark.

    Would it not be simpler to just have 1 (or maybe 2 or 3) worksheets with ALL your data on it/them, and then use range names to ID the various components? That might make the task of hiding/showing tabs unnecessary?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-13-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2008
    Posts
    28

    Re: How to activate and hide a cell when hyperlink is clicked?

    The layout cannot be changed. Each worksheet has over 300 cells of info regarding the components. They are perfectly organized so they all look the same and each component can be properly documented.
    I want all the worksheets to be hidden, expect the main one with the list. From that list, I want to be able to access the worksheets that are hidden (100+ worksheets). I need to unhide the worksheet I choose (formula above provides the hyperlink but I can't seem to be able to access it when it is hidden). I am wondering if there is a way to unhide the worksheet, activate it, then unhide it when i change back to the main sheet.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: How to activate and hide a cell when hyperlink is clicked?

    It's rare that something "cannot" be changed, but if you would prefer to keep the layout the way it is, hopefully some-one can put some VBA together for you, good luck

  5. #5
    Registered User
    Join Date
    04-13-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2008
    Posts
    28

    Re: How to activate and hide a cell when hyperlink is clicked?

    Hehe thank you! Too many components to go back on the layout now :P That's what I mean't by "can't be changed".

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: How to activate and hide a cell when hyperlink is clicked?

    Any chance of providing a sample workbook?

  7. #7
    Registered User
    Join Date
    04-13-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2008
    Posts
    28

    Re: How to activate and hide a cell when hyperlink is clicked?

    A lot of proprietary info! It would take too long to simplify it and remove important info. I think this requires VBA to solve

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: How to activate and hide a cell when hyperlink is clicked?

    OK good luck

    (my VBA sucks)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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