previous.copy

M

Myriam

Hello everyone,
I have been trying to find some logic to what's going on in a wkbk and I
can't see it.

Using 2003 I created a wkbk with 100+ sheets where users may copy from the
previous sheet by clicking a button w/ the following code.

ActiveSheet.Previous.range("B10:H50").Copy ActiveSheet.range("B10:H50")

It works perfect and it does not slow down the workbook a bit.
I upgraded to Excel 2007 and once I get to the 10 sheet, the macro begins to
run slower and slower until the wkbk eventually crashes.
Any ideas on why this may be happening?
Thanks for any suggestions!
 
M

Mike Fogleman

It looks like you are at the limits of your memory after a few copies, which
can happen. Instead of copying, why not just assign the values to the range?

ActiveSheet.Range("B10:H50").Value =
ActiveSheet.Previous.Range("B10:H50").Value

Mike F
 
M

Myriam

Thanks for your response. I think your solution would work. However, I
changed the macro to yours but it is still slowing down after a few sheet, I
think the memory remained full and I need to clear it. Do you know how I can
clear it?
Regards,
 
M

Mike Fogleman

Sometimes saving the workbook will clear things out, but it seems that the
multiple copy/paste may not have been the prime issue, so there may be
something else bogging things down.

Mike F
 

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