How do you create a hyperlink to a chart within an Excel 2007 docu

C

Catherine D

I am creating a dashboard page to navigate to the sheets in a large Excel
2007 file. How do I create a hyperlink to a chart that is on a separate
worksheet? I cannot find a way to name it or create a cell reference so that
it appears in the list of linkable items in the Insert Hyperlink dialog box.
 
J

Jon Peltier

A worksheet is the sheet with cells and rows and columns. Charts can be
embedded on a worksheet. You hyperlink to one of these charts by actually
hyperlinking to a cell under the chart, usually under the top left corner of
the chart. A chart sheet, on the other hand, has no cells, no data other
than the chart. You cannot create a hyperlink to a chart, but you can make a
VBA link that mimics one:

http://peltiertech.com/Excel/Hyperlinks.html

- Jon
 
C

Catherine D

Hello Jon,

Thanks for your help. This works great for the first "link" but now how do
you repeat it for other "links" on the same worksheet? I tried to call the
sub "Worksheet_SelectionChange2" but that did not work.

(I am not a programmer!)

Thanks. Catherine
 
J

Jon Peltier

Suppose the chart names are listed in B2:B5. This code will activate
whicheveer chaart name is clicked on. Private Sub
Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("B2:B5")) 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

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top