Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default '.Copy Destination:=' temporarily freezes multiple instances in Excel 2010

Dear all,

I'm running vba code in multiple instances of Excel and I recently migrated from 2003 to 2010.

Something odd happens: processor load of _all_ processors occasionally falls well below 15% if any of the running instances uses the copy code with the format:

Range("A1:Z1").Copy Destionation:=Range("A2:Z4000")

Together with the fall in processor load, all instances of Excel temporarily freeze for a few seconds, even though the other instances are not executing this kind of code, and should keep running at near 100% processor load.

The code does not cause Excel to crash, but it does affect overall speed on every time this code is executed in any of the instances. Applications other than Excel are not affected.

To me it sounds like a bug in Excel 2010 (possibly 2007 as well) as the described problems were not happening when running multiple instances in Excel 2003.

This raises three questions for me:
a) Is there anyone out there that can confirm this problem?

And b) Is there a workaround?

For example:
1) Is there any other efficient way to copy a range without using the clipboard?
Or more specific:
2) Is it possible to copy to an instance specific (local) clipboard? (.. so nothing is ever accidentally copied between the multiple instances of Excel)


Thanks in advance for your efforts!

Poniente
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default '.Copy Destination:=' temporarily freezes multiple instances in Excel 2010

If it is mostly formulas, requiring calculation then it won't happen instantly.
You could turn off calculation, paste and the turn calculation back on.

Specifying the workbook/worksheet is good practice when copying data. It might even help.

"Destionation" is not spelled correctly.

..Value = .Value is another way, if you don't care about formatting/formulas.
It is faster, but I've had it fail (rarely). When speed is essential (used in a loop),
I back it up by checking for an error and if so pasting the data.
--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(Bingo Card Variety .xls workbook - in the free folder)





"Poniente"
wrote in message
news:960744.2926.1326628507334.JavaMail.geo-discussion-forums@yqgi18...
Dear all,

I'm running vba code in multiple instances of Excel and I recently migrated from 2003 to 2010.

Something odd happens: processor load of _all_ processors occasionally falls well below 15% if any
of the running instances uses the copy code with the format:

Range("A1:Z1").Copy Destionation:=Range("A2:Z4000")

Together with the fall in processor load, all instances of Excel temporarily freeze for a few
seconds, even though the other instances are not executing this kind of code, and should keep
running at near 100% processor load.

The code does not cause Excel to crash, but it does affect overall speed on every time this code
is executed in any of the instances. Applications other than Excel are not affected.

To me it sounds like a bug in Excel 2010 (possibly 2007 as well) as the described problems were
not happening when running multiple instances in Excel 2003.

This raises three questions for me:
a) Is there anyone out there that can confirm this problem?

And b) Is there a workaround?

For example:
1) Is there any other efficient way to copy a range without using the clipboard?
Or more specific:
2) Is it possible to copy to an instance specific (local) clipboard? (.. so nothing is ever
accidentally copied between the multiple instances of Excel)


Thanks in advance for your efforts!

Poniente



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default '.Copy Destination:=' temporarily freezes multiple instances inExcel 2010

Hi Jim,
Solved!

Thanks for taking time Jim. It's mostly formulas. I just found a
solution that is a fast workaround for formulas (a lot faster than
'.copy destination:=').

To whom it may concern:

The source is:
http://excelexperts.com/copy-values-vba


The following simplified code works best for me:
<begin
Sub PasteFormulasFast(rngSource As Range, rngDesti As Range)

rngDesti.Formula = rngSource.FormulaR1C1

End Sub
<end

To get things started:
Call PasteFormulasFast(Range("Sheet1!A1"),Range("Sheet1 !A2:A4000"))


Thanks again Jim for looking into this!
Poniente
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy paste formulas when running multiple instances of excel Poniente Excel Programming 2 January 2nd 09 02:55 PM
Can not copy/paste from Excel XP into other programs - freezes Tammy Excel Discussion (Misc queries) 3 October 16th 08 06:06 PM
Using Ctrl + Copy and Paste across multiple instances of Excel Paul Excel Programming 0 July 8th 08 09:47 PM
Excel 2007 Freezes when I try to copy a cell Mastiha Excel Discussion (Misc queries) 0 November 11th 07 08:26 PM
Selection.Copy on Temporarily unhidden excel sheet - possible bug? Joshua Excel Programming 1 November 7th 07 10:38 PM


All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"