How to write a code which select a chart when clicking on it?
How to write a code which select a chart when clicking on it?
I have written following macro to display a chart in another worksheet (customizing “excel moving chart feature”) when clicking on it. (I want to assign this macro to all my charts). My problem is that I don’t Know how to select (activate) the chart I want to have it displayed in another worksheet. (see the attachment.)
Can you guides me on this issue?
Sub enlargchart()
On Error Resume Next
Application.DisplayAlerts = False
ActiveWorkbook.Charts.Delete
ActiveChart.ChartArea.Copy
range("A1").Select
ActiveSheet.Paste
ActiveChart.Location Where:=xlLocationAsNewSheet
Application.DisplayAlerts = True
End Sub
|