Excel macro error

G

Guest

When running macro of workbook with 200 worksheets the process gets about 75%
through with the operation and the following error is produced.
'Excel cannot complete this task with available resources. Choose less data
or close other applications.' When you click on OK the following VB error
comes up. "Run-time error '1004'; Paste method of worksheet class failed" I
have checked the memory and that does not seem to be the issue. I have no
other applications running at the time. Any thoughts would be greatly
appreciated.
Terry
 
F

Frank Stone

hi,
total memeory is devided up and used in different ways.
I noticed you use the word paste so you might have some
clipboard problems. in your code after every paste enter
this line of code.
application.cutcopymode = fase. this will clear the
clipboard.
if your macro is failing at the same place each time, then
i would look for a syntax problem with our paste method at
that point.
these formulas might help you monitor excels memory use
=INFO("TotMem")
=INFO("MemUsed")
=INFO("MemAvail")
Godd luck
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top