Hello all,
I am currently working on a code, which is used to visualize graphs. I copy paste the data from other work books and create the graph. It works fine in the debugging mode, however I come across run time error when I run the macro.
The bold line is where I have the error. The error is displayed is [h=2]Runtime error '1004' Method 'Location' of object '_Chart' failed[/h]. Please help.
I am currently working on a code, which is used to visualize graphs. I copy paste the data from other work books and create the graph. It works fine in the debugging mode, however I come across run time error when I run the macro.
Code:
Call createchart1(j, k, j + i1 - 1) Application.ActiveChart.Parent.Name = "Reached Target1"
[B] ActiveChart.Location Where:=xlLocationAsObject, Name:="Week" & i & "_Visualization"[/B]
ActiveSheet.ChartObjects("Reached Target1").Activate
ActiveChart.PlotArea.Select
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Reached Target1").IncrementLeft -217.6118897638
ActiveSheet.Shapes("Reached Target1").IncrementTop -82.9411811024
With ActiveSheet.Shapes("Reached target1")
.Height = 250 ' resize
.Width = 360 ' resize
.Top = 0
End With
Last edited: