+ Reply to Thread
Results 1 to 5 of 5

Hyperlink to Chart Sheets???

  1. #1
    Registered User
    Join Date
    03-30-2007
    Posts
    18

    Hyperlink to Chart Sheets???

    Hi I have created numerous Charts (onto new sheets) in my Excel Workbook.

    I have created an index page which I want to Hyperlink to these charts within the Excel workbook.

    The problem is that I cannot hyperlink to these chart sheets - I can only hyperlink to the sheets which contain the data tables from which these charts are created.

    Any idea how I can hyperlink these chart sheets?

    Thanks!!!

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Well a way is to draw a button on the sheet and attach a macro to it.

    Just go tools, macro, record new macro
    then click on the chart tab and then stop the macro.
    then attach the macro to the button

    Regards

    Dav

  3. #3
    Registered User
    Join Date
    03-30-2007
    Posts
    18
    I've found an article which explains it nicely

    Hyperlink to a Chart Sheet
    You can't hyperlink to a chart directly, and a chart sheet has no underlying cells you can link to. You can fake it with a Worksheet_SelectionChange event procedure, however. In this example, the hyperlink is in cell B2. Enter the name of the chart sheet in cell B2, and format it with blue underlined text, so it looks like a real hyperlink. Right click on the sheet tab, select View Code, and paste this macro into the code module that appears:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Intersect(Target, Range("B2")) Is Nothing Then
    On Error Resume Next
    Charts(Target.Value).Activate
    If Err.Number <> 0 Then
    MsgBox "No such chart exists.", vbCritical, _
    "Chart Not Found"
    End If
    On Error GoTo 0
    End If
    End Sub
    When the user selects cell B2, the procedure is activated. The code jumps to the sheet with the name in the cell. If Excel cannot go to that sheet, the code assumes it's because the sheet doesn't exist, and alerts the user.

  4. #4
    Registered User
    Join Date
    06-11-2013
    Location
    Tampa
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Hyperlink to Chart Sheets???

    What dnf999 mentinoed works well for one hyperlink. Do you know how we should change it if we have multiple cells being linked to different chart sheets?

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Hyperlink to Chart Sheets???

    AnnaDana,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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