+ Reply to Thread
Results 1 to 11 of 11

Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

  1. #1
    Registered User
    Join Date
    03-30-2015
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    27

    Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    Good morning all. I have a workbook I've been developing that will be used to track rental equipment for my company. First of all, I know just enough about vba to get me in trouble. I can't really write the codes, but I'm usually able to pull them from forums and modify them for my application. I have a macro that pulls information from a specific range on all active sheets and pastes it onto the "Home" sheet as a form of summary. The problem I'm having is that I also have a macro to create hyperlinks on the "Home" tab to quickly navigate to the associated sheet, but I can't get this macro to exclude hidden sheets and the "Home" sheet; you can see where I have these two filtered out in SummarizeSheets, but I can't get it to do the same in AddHyperlinks. I know this shouldn't be a difficult fix, but it's seemingly above my head. If anyone can shine some light on it for me, I would be greatly appreciative. If you need any other information or the workbook itself uploaded, just let me know. The code I'm currently using is below:


    Sub SummarizeSheets()

    Please Login or Register  to view this content.
    Last edited by Kenny Blackwell; 03-30-2015 at 01:10 PM. Reason: Solved

  2. #2
    Forum Contributor
    Join Date
    01-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    240

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    Welcome to the forum.

    You employ two loops one to copy the data and this has the two filters to ignore hidden and home sheet and a seemingly superfluous loop to go back through and do the hyperlinks.

    I suggest you forget the second loop and just do it all in one.
    Please consider adding a * if I helped.

  3. #3
    Registered User
    Join Date
    03-30-2015
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    27

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    Thanks Brendan. I've tried carrying the "End If" statements down beneath the hyperlink section in hopes of applying the same filter to both sections, but it always results in errors. I'm afraid I'm not knowledgeable enough to fix it on that suggestion alone, I need instructions a little more specific. Can you "dumb that down" a little more for me?

  4. #4
    Forum Contributor
    Join Date
    01-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    240

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    Something like this.......

    Please Login or Register  to view this content.

    but you might need to post an example workbook so we can get the references right

  5. #5
    Registered User
    Join Date
    03-30-2015
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    27

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    I can try posting that code in place of my existing one. Either way, I've attached the workbook for your reference. I mainly do this because if I've any other redundant codes in here, I would greatly appreciate it being brought to my attention so I can correct it before rolling it out to the rest of the department. Let me know if you have any issues viewing the attached, please. Thank you.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    01-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    240

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    tidying up the references try replacing the top of your code with ...

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-30-2015
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    27

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    Marvelous, Sir!! Works exactly as I envisioned. Since you're so insanely capable with all this, can I ask one more small favor? Could you possibly modify my GoToFirstSheet macro to run the UpdateSheet macro on the backside of it? This way when a user creates a new rental asset and returns to the Home sheet, it will go ahead and update the list to include the newest entry. Please let me know if this request is unclear

  8. #8
    Forum Contributor
    Join Date
    01-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    240

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    All you need to do is write

    SummarizeSheets

    before End Sub

    in the GotoFirstSheet macro.

  9. #9
    Registered User
    Join Date
    03-30-2015
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    27

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    Do I need to include any instructions in front of SummarizeSheets to tell Excel to run this macro? I added the wording directly before End Sub but it didn't run it.

  10. #10
    Forum Contributor
    Join Date
    01-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    240

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    whoops sorry put SummarizeSheets before exit sub - about half way down

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    03-30-2015
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    27

    Re: Exclude Hidden Sheets/"Home" Sheet when creating hyperlinks

    I can't thank you enough for your help, Brendan!! Have a great day!!

+ 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. Replies: 1
    Last Post: 06-06-2013, 06:28 PM
  2. [SOLVED] Need Macro to compile data from "Weekly" sheets and sum up into "Monthly" summary sheet
    By mo4391 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2013, 07:25 PM
  3. Help Needed to get Filters Using "Include" and "Exclude" multiple values on one column.
    By alfykunable in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2012, 04:03 AM
  4. Enter Data on "Main" or "Input" Sheet and Copy to One of Many Other Sheets
    By timothy_no7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2012, 07:29 PM
  5. "With Sheets" Issue - macro on one sheet to affect hidden rows on other sheets
    By Punsterr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2006, 12:10 AM

Tags for this Thread

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