Thread: Macro Problem
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] lj@spu.edu is offline
external usenet poster
 
Posts: 3
Default Macro Problem

I am running into a problem when I try and run a macro that copies a
sheet that has a pivot table in it and moves it to another folder and
then copys-past special-values the sheet. When I try and run macros
that do this I get an error message when the macro finishes processing
that says "Excel cannot complete this task with available resources.
Choose less data or close other applications". Do you have any
suggestions or workarounds I can use to avoid this problem? Below is
an example of the visual basic I am using in the macro. The problem
occurs
when I copy and paste the pivot table. I do not have the same problem
when
a pivot table is not involved.

Sheets(Array("Calculations", "Trading_Profit")).Select
Sheets("Trading_Profit").Activate
Sheets(Array("Calculations", "Trading_Profit")).Copy
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False