View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pwermuth[_5_] pwermuth[_5_] is offline
external usenet poster
 
Posts: 1
Default Problems with ChartObjects


Can somebody help me fix the following:

When I run the following line of code:

Worksheets(destinationSheet).ChartObjects(chartToC opy).Activate

where destinationSheet is a string with the name of the sheet "Output
2", and chartToCopy is also a string with the name of a chart "char 11"

I get a "Run-time error '1004':
Unable to get the ChartObjects property of the Worksheet class."


I think it worked when I used
Activesheet.ChartObjects(chartToCopy).Activate but I do not want to
make it dependent on being on that sheet.


--
pwermuth
------------------------------------------------------------------------
pwermuth's Profile: http://www.excelforum.com/member.php...o&userid=24997
View this thread: http://www.excelforum.com/showthread...hreadid=386289