Selecting Charts

purceld2

Well-known Member
Joined
Aug 18, 2005
Messages
586
Office Version
  1. 2013
Platform
  1. Windows
how can you select a chart from a frount page button or hyperlink

Hyperlink does not seem to allow you

thank you
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Is the hyperlink in an excel worksheet? If so, you could create "dummy" hyperlinks and use the followhyperlink event of the worksheet. To make a dummy hyperlink, set the url to the workbook that the hyperlink is in.

It's probably not the best way to do it but it will work.

See below for a quick example to show the concept.

If the hyperlink is somewhere else you could probably attach some code to the selectionchange event or the activate event of the worksheet.


Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

If ActiveCell.Address = Range("C20").Address Then
    MsgBox "you clicked the hyperlink in cell C20"
ElseIf ActiveCell.Address = Range("B16").Address Then
    MsgBox "you clicked the hyperlink in cell B16 the chart will now be selected"
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveChart.ChartArea.Select
End If

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top