View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Larry[_3_] Larry[_3_] is offline
external usenet poster
 
Posts: 1
Default Paste Method of Worksheet Failed When Copying Chart Object

In a VBA macro for Excel, I have some code that works for awhile and
then bombs with the Error of a Past Method Worksheet Failed. I'm
essentially running through a series of products and producing 6
charts for each product on a sheet. The 6 charts are pre-made and
have specific names assigned to them so I can easily copy them to the
newest sheet.

The error is not too descriptive, but I'm guessing the chart was never
copied. Possibly due to lack of memory. I've tried using
Application.CutCopyMode = False to dump memory, but that does not seem
to work.

Any guidance on this error would be much appreciated.

For cht = 1 To 6
Select Case cht
Case 1
GRAPH_TYPE = "DueTo_CHT"
'sheigth = 1.14
'swidth = 1.5
Sheets("STD_GRAPHS").ChartObjects("DueTo_CHT").Cop y
Sheets("temp_sheet").Paste
-----------------------------------------------Error occurs here
Application.CutCopyMode = False
With Sheets("temp_sheet").Shapes("DueTo_CHT")


Regards,

Larry