Click on labels to hyperlink?

  • Thread starter Thread starter Dan Tabla
  • Start date Start date
D

Dan Tabla

Thanks to this forum I learned how to add labels to my charts but I don' t
know how to attach Hyperlinks to my labels!!!
 
Hi,

I don't think you can attach a hyperlink to a data label. You can attach
hyperlinks to text boxes on chart.

If this helps, please click the Yes button

Cheers,
Shane Devenshire
 
I don't know how to add a text box on a chart.

Shane Devenshire said:
Hi,

I don't think you can attach a hyperlink to a data label. You can attach
hyperlinks to text boxes on chart.

If this helps, please click the Yes button

Cheers,
Shane Devenshire
 
Hi,

You can not apply hyperlinks to the data labels but with some VBA you
can hook into the chart events and mimic a hyperlink.

create a chart and right click the sheet tab. Pick View code and then
post the following.

Private Sub Chart_Select(ByVal ElementID As Long, _
ByVal Arg1 As Long, ByVal Arg2 As Long)

If ElementID = xlDataLabel Then
If Arg1 = 1 Then
If Arg2 = 2 Then
' selected 2 datalabel of series 1
ActiveWorkbook.FollowHyperlink "http:\\" _
& ActiveChart.SeriesCollection(Arg1).DataLabels(Arg2).Text
End If
End If
End If

End Sub

You can find more information on chart events here
http://www.computorcompanion.com/LPMArticle.asp?ID=221

To add a text box select the chart and just type something. It will
automatically add a textbox. You can then add a hyperlink to that.

Cheers
Andy
 
Thank you so much Andy and Shane .
You realy helped me. I'm doing VBA code. Any advice how/where to start
taking classes doing it organized/profesionaly because right now I'm doing it
randomly to improve my office work production!
 
Back
Top