A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hyperlinks to Charts/Graphs



 
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2004, 08:59 PM
Chris Grant
external usenet poster
 
Posts: n/a
Default 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  
Old April 22nd, 2004, 09:24 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default 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  
Old May 3rd, 2004, 03:24 PM
Bob Flanagan
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.