+ Reply to Thread
Results 1 to 11 of 11

Create links to all sheets in a workbook

  1. #1
    Registered User
    Join Date
    05-13-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    76

    Create links to all sheets in a workbook

    I am looking for some code to make a list of links to each sheet in my workbook starting at the 7th tab and going to the end. The result would need to start on the 6th sheet which is named "Summary" in cell A4. I also need it to clear previous entries from A4 down. Any code I have come across list every sheet and I need to exclude the first 6. Any help is greatly appreciated.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Create links to all sheets in a workbook

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.

    I'm not clear exactly what you are looking for. Are you saying that all the sheets after the 6th tab index sheet each contain links to other sheets? e.g. sheet 7 might contain three links to sheet 10, sheet 8 might contain 10 links to sheet 11 and 5 links to sheet 12....etc. and you want a list of all these? If so what do you want to see. The link name, the address to which it links...what?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-13-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    76

    Re: Create links to all sheets in a workbook

    Quote Originally Posted by Richard Buttrey View Post
    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.

    I'm not clear exactly what you are looking for. Are you saying that all the sheets after the 6th tab index sheet each contain links to other sheets? e.g. sheet 7 might contain three links to sheet 10, sheet 8 might contain 10 links to sheet 11 and 5 links to sheet 12....etc. and you want a list of all these? If so what do you want to see. The link name, the address to which it links...what?
    I attached a before and after file of my workbook. I couldnt create the links myself on the summary page but I made them blue to simulate a link.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Create links to all sheets in a workbook

    Is the requirement just to list the sheet tab names?

    You mentioned links, by which I assumed you meant hyperlinks.

  5. #5
    Registered User
    Join Date
    05-13-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    76

    Re: Create links to all sheets in a workbook

    Quote Originally Posted by Richard Buttrey View Post
    Is the requirement just to list the sheet tab names?

    You mentioned links, by which I assumed you meant hyperlinks.
    Not just a list......I need the list to be hyperlinks to the sheet. I currently have it set up to make just a list. I need the links

  6. #6
    Registered User
    Join Date
    05-13-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    76

    Re: Create links to all sheets in a workbook

    So what I would want to see in column A is a list of the tab names starting at tab 7. And I want that list to be hyperlinks to the tab it references.

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Create links to all sheets in a workbook

    Hi,

    See attached.

    I also shortened the code in the Summary sheet for populating the formulae in columns B:G

  8. #8
    Registered User
    Join Date
    05-13-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    76

    Re: Create links to all sheets in a workbook

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    See attached.

    I also shortened the code in the Summary sheet for populating the formulae in columns B:G
    The only issue I had with this hyperlink list is that if I add in a new sheet and run the macro again it doesnt add the new sheet to the list. It still only shows the 3 sheets that were originally in the workbook. I will be adding worksheets through the life of the project so I will need to be able to refresh this list when I add one. Any idea why it is not picking up the new sheet?

  9. #9
    Registered User
    Join Date
    05-13-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    76

    Re: Create links to all sheets in a workbook

    I did a little testing and if I add 5 sheets before I run the macro for the first time it finds all the tabs. The problem is when I merge in a new sheet after I have run the macro previously and try to run the macro again to refresh the sheet. For some reason its not recognizing the newly added sheet.
    Last edited by allenayres83; 02-01-2021 at 09:42 PM.

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Create links to all sheets in a workbook

    Would you clarify please. The original request was to add hyperlinks to all the pre-existing sheets. That's all I was addressing.

    Would you explain what you mean by 'merge' a new sheet. Is that something different to you 'adding' a new sheet.

    Upload the workbook and describe exactly the steps you take and which macro you are running.

  11. #11
    Registered User
    Join Date
    05-13-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    76

    Re: Create links to all sheets in a workbook

    Quote Originally Posted by Richard Buttrey View Post
    Would you clarify please. The original request was to add hyperlinks to all the pre-existing sheets. That's all I was addressing.

    Would you explain what you mean by 'merge' a new sheet. Is that something different to you 'adding' a new sheet.

    Upload the workbook and describe exactly the steps you take and which macro you are running.
    So this is a fieldbook for construction projects. Each tab is a different work item. All of these projects start out with varying number of work items. I have templates set up for each work item in our catalog and they can be located in a templates folder. When I first create this fieldbook I use Module 7 "Mergeandfillheader" to merge all work items on the data tab into the fieldbook from my templates folder. Throughout the life of the project new work items may be added to the project. When this happens I use Module 1 "MergeExcelFiles" to bring in a template for that work item. So as those changes happen I need to run the "ListAllSHeets" macro that you created to update my summary. I would like the "ListAllSheets" macro to first clear out anything from A:4 down and then make the list of hyperlinks starting at tab 7 and going all the way to the last tab. If I have to add a tab, I would like to be able to run the macro again to make a list from tab 7 all the way to the last tab again. This action would update my summary and include the new tab. I hope this helps and I do appreciate your help. The same workbook I attached before applies.

+ 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: 08-11-2020, 03:40 AM
  2. create links to all active sheets
    By asad.ermo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-29-2018, 07:03 AM
  3. Calendar with links to sheets in a workbook
    By jlevesqu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-17-2015, 08:35 AM
  4. Find next available row based on a range then create links between two sheets
    By Titchy Dean in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2012, 07:20 PM
  5. Automatically Copy sheets in one workbook to create sheets in a new workbook..
    By leebarratt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2011, 03:14 AM
  6. Open workbook, update links, create csv
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-02-2011, 06:16 PM
  7. [SOLVED] How do I create a workbook that links info in cell to a calendar?
    By JH in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-30-2005, 05:06 PM

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