Selecting Charts

purceld2

Well-known Member
Joined
Aug 18, 2005
Messages
583
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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

KenMillard

Board Regular
Joined
Apr 25, 2007
Messages
151
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
 

Forum statistics

Threads
1,181,410
Messages
5,929,774
Members
436,688
Latest member
sunnyBNH013

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
Top