I have used this code to insert picture to all chart in the selected worksheets. It works at some first times. But after that, it can not run anymore. And some time, it ignore some chart.
I can not find out where is the bug... please help....
Sub Insert_Pic()
Dim icht As Integer
For icht = 1 To ActiveSheet.ChartObjects.Count
ActiveSheet.ChartObjects(icht).Activate
ActiveChart.ChartArea.Select
ActiveChart.Pictures.Insert("F:\My Documents\My Pictures\PI logo\cola.jpg"). _
Select
Next
End Sub
The error comes from :
[VBA] ActiveChart.Pictures.Insert("F:\My Documents\My Pictures\PI logo\cola.jpg"). _
Select
[/VBA]