If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Hyperlinks to Charts/Graphs
why is it that when i create hyperlinks to worksheets in
excel from a main menu, they work fine, but when i go to create a hyperlink to a chart or graph, the chart is not displayed as the other worsheets are? Thanks a lot, Chris Grant |
#2
|
|||
|
|||
Hyperlinks to Charts/Graphs
Hi Chris
not without using VBA and triggering the selection_change event of your worksheet. Have a look at http://pubs.logicalexpressions.com/P...?ID=209#jon016 for some code -- Regards Frank Kabel Frankfurt, Germany Chris Grant wrote: why is it that when i create hyperlinks to worksheets in excel from a main menu, they work fine, but when i go to create a hyperlink to a chart or graph, the chart is not displayed as the other worsheets are? Thanks a lot, Chris Grant |
#3
|
|||
|
|||
Hyperlinks to Charts/Graphs
Chris, on the sheet containing the hyperlinks, put the following in the
sheet module: Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) ChangeToChartSheet End Sub In a regular module, put the following: Sub ChangeToChartSheet() Dim cSheet If Not IsEmpty(ActiveCell) Then With ActiveCell If .Font.Underline = xlUnderlineStyleSingle Then If .Font.ColorIndex = 5 Then On Error Resume Next Set cSheet = Sheets(ActiveCell.Value) On Error GoTo 0 If IsEmpty(cSheet) Then MsgBox "Sheet " & ActiveCell.Value & " not found" Exit Sub End If If TypeName(cSheet) = "Chart" Then If cSheet.Visible = xlSheetVisible Then cSheet.Select Else MsgBox "Chart sheet " & ActiveCell.Value & " is hidden" End If End If End If End If End With End If End Sub The above code will change to a chart sheet if the cell is formated to look like a hyperlink. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Chris Grant" wrote in message ... why is it that when i create hyperlinks to worksheets in excel from a main menu, they work fine, but when i go to create a hyperlink to a chart or graph, the chart is not displayed as the other worsheets are? Thanks a lot, Chris Grant |
Thread Tools | |
Display Modes | |
|
|