+ Reply to Thread
Results 1 to 4 of 4

Vba to create hyperlinks for multiple sheets on one page

Hybrid View

  1. #1
    Registered User
    Join Date
    01-14-2015
    Location
    Chandler, Arizona
    MS-Off Ver
    2013
    Posts
    2

    Vba to create hyperlinks for multiple sheets on one page

    Hello,

    I have a workbook with multiple sheets. On my sheet titled "ALL" from H2:H201 I want to create hyperlinks to sheets 1-200. Can anyone provide VBA or macro to do this. I would really appreciate the help as I don't want to create 200 hyperlinks individually. There are other sheets in the workbook but they are not numbered and have other names. I only need hyperlinks for the sheets labeled 1-200. The friendly link name can just be the sheet name.

    Thanks for any help you can provide. I found the below VBA but don't know how to tailor it to my use.

    Sub addHyperlinks()
    i = 1
    For Each sh In ActiveWorkbook.Sheets
    If sh.Name <> ActiveSheet.Name Then
    ActiveSheet.Hyperlinks.Add Anchor:=Range("A" & i), Address:="", SubAddress:= _
    sh.Name & "!A1", TextToDisplay:=sh.Name
    i = i + 1
    End If
    Next
    End Sub
    Last edited by iastshane; 01-20-2015 at 03:59 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Vba to create hyperlinks for multiple sheets on one page

    Try

    Sub addHyperlinks()
    Sheets("ALL").Activate
    For N = 1 To 200
        ActiveSheet.Hyperlinks.Add Anchor:=Range("H" & N + 1), Address:="", SubAddress:= _
        "'" & N & "'!A1", TextToDisplay:="" & N & ""
    Next N
    End Sub
    Martin

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

    Re: Vba to create hyperlinks for multiple sheets on one page

    Copy the code in to a module.
    Go to the All sheet on a cell where you want the list to begin.
    Run the macro.

    It should insert hyperinks to all the sheets in a nice list
    Please consider adding a * if I helped.

  4. #4
    Registered User
    Join Date
    01-14-2015
    Location
    Chandler, Arizona
    MS-Off Ver
    2013
    Posts
    2

    Red face Re: Vba to create hyperlinks for multiple sheets on one page

    Solution worked perfectly. Thank you

+ 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. How do i create multiple hyperlinks to various pdf files?
    By Mtlittleton in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-11-2013, 11:43 AM
  2. Macro to create hyperlinks between sheets
    By Ashok Dsouza in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2012, 10:18 AM
  3. Create multiple hyperlinks automatically
    By frostgrip in forum Excel General
    Replies: 0
    Last Post: 08-09-2012, 04:32 PM
  4. [SOLVED] Macro to create Hyperlinks of a new page
    By digixu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-16-2012, 10:53 AM
  5. How to create multiple hyperlinks
    By nmss18 in forum Excel General
    Replies: 2
    Last Post: 07-18-2011, 05:10 PM

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