Thanks,
George
g-d...@ti.com
Assumptions...
- the name of the workbook is 'MyCharts.xls'
- the index worksheet is called 'Sheet1'
- the cell where the hyperlink goes is 'B1'
- the chart sheet is called 'Chart1'
[remember, whereever it says one of the above assumption names, change it to
your real-life name]
1) Create a hyperlink in 'Sheet1 in cell 'B1' by going to cell 'B1' and
then selecting INSERT / HYPERLINK
2) In the 'Type the Cell Reference' textbox, type "B1". This way when it
is clicked it will hyperlink to itself.
3) In the 'Text to Display' textbox, type "Chart1"
4) Paste VBA code into the Sheet1 module.
- Select TOOLS / MACRO / VISUAL BASIC EDITOR
- In the upper right hand window, you will see the 'Project' window.
- Look for 'MyCharts.xls'
- Double-click on 'MyCharts.xls' and a large blank window will open up to
the right of the 'Project Window'
- Paste the following code into that window
'/====Start of Code===================/
Private Sub Worksheet_FollowHyperlink(ByVal _
Target As Hyperlink)
If ActiveCell.Value = "Chart1" Then
Sheets("Chart1").Select
End If
End Sub
'/======End of Code===================/
5) Select FILE / CLOSE AND RETURN TO MICROSOFT EXCEL
6) Save your workbook
What this does...
Every time a hyperlink is pressed on Sheet1 (only), the VBA code checks to
see if that hyperlink says 'Chart1'. If it doesn't, nothing happens. If it
DOES say 'Chart1', then the worksheet called Chart1 is selected.
HTH,
Gary Brown
"George" <Geo...@discussions.microsoft.com> wrote in message
news:2493A7E2-F417-4430...@microsoft.com...
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=209#jon016
that you may be able to use.
--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html