+ Reply to Thread
Results 1 to 3 of 3

Create hyperlinks to each sheet using VBA

  1. #1
    Steve Mackay
    Guest

    Create hyperlinks to each sheet using VBA

    I have a simple macro for listing all the worksheets in a workbook,
    essentially creating a table of contents for my file:

    Sub ListSheets()
    For iSheets = 1 To Sheets.Count
    ActiveCell.Value = Sheets(iSheets).Name
    ActiveCell.Offset(1, 0).Activate
    Next iSheets
    End Sub

    What I would like to do is make each of those cells a hyperlink to the
    corresponding worksheet, to cell A1. Any ideas?

    Thanks,
    Steve Mackay


  2. #2
    Tom Ogilvy
    Guest

    Re: Create hyperlinks to each sheet using VBA

    See this code at David McRitchie's site:

    http://www.mvps.org/dmcritchie/excel/buildtoc.htm

    --
    Regards,
    Tom Ogilvy


    "Steve Mackay" <stevenmackay@yahoo.com> wrote in message
    news:1108743770.586041.273250@g14g2000cwa.googlegroups.com...
    > I have a simple macro for listing all the worksheets in a workbook,
    > essentially creating a table of contents for my file:
    >
    > Sub ListSheets()
    > For iSheets = 1 To Sheets.Count
    > ActiveCell.Value = Sheets(iSheets).Name
    > ActiveCell.Offset(1, 0).Activate
    > Next iSheets
    > End Sub
    >
    > What I would like to do is make each of those cells a hyperlink to the
    > corresponding worksheet, to cell A1. Any ideas?
    >
    > Thanks,
    > Steve Mackay
    >




  3. #3
    Steve Mackay
    Guest

    Re: Create hyperlinks to each sheet using VBA

    Thanks, Tom.

    There is a lot of good information here. I am a rookie to VBA, so most
    of it is over my head, but I cut and paste the macro into a module and
    it worked as i wanted it to.


    Thanks for your help.
    Steve


+ 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