View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Poniente Poniente is offline
external usenet poster
 
Posts: 16
Default Copy paste formulas when running multiple instances of excel

Hi all,
I'm running separate instances of Excel 2003 to make better use of
processor power. Each of 3 instances of Excel runs a simulation. Every
now and then this process fails because of interfering copy paste
commands which are somehow get mixed up across the multiple instances
of excel.

I'm already using the range(a).value = range(b).value copy methode for
values.

Can anyone help me find a similar methode for 1) formulas and 2) all
formats, without using the troublesome pastespecial?

Ad 1) formulas:
I tried:
Range("C1:C10").Formula = Range("A1:A10").Formula
doesn't work, as it does not retain the dynamic nature of some of the
references in the formulas..
I also tried
Range("A1:C10").Formula = Range("A1:A10").Formula
which does work, but overwrites B1:B10, and I can't have that..


Regards,
Poniente

http://groups.google.nl/group/micros...79a1d63d284bb5
On 8 apr, 23:11, "Jon Peltier" wrote:
Without seeing any of your code, it's hard to tell where you might make
improvements. I can't see that cell by cell is more reliable than range by
range. Could you do range by range transfer of .value, instead ofcopy/paste? For example:

Worksheets(1).Range("A1:D10").Value = Worksheets(2).Range("F21:I30").value

No clipboard required.

- Jon
-------
Jon Peltier, MicrosoftExcelMVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -http://PeltierTech.com
_______

....
"snoopydoopy" wrote in message
I just realized that in the Macro, I am doing lot ofcopypaste. So
if there aremultipleinstancesorexcelrunning and each of them is
executing macros with lot ofcopyandpastecommands then the result
is going to be very screwed up. So I need to write code which would
do cell by cell explicitcopy.



....
"snoopydoopy" wrote in message
Yeah, good point. I had taken care of part of it but need to remove
the selection portion for printing and stuff. I find it fascinating
that other people haven't felt the need to run things in parallel to
exploit the multiprocessor scenario. I knowexcel2007 does threading
behind the scenes to speed up calculations but still I think there is
a definite need to run lot of calculations in parallel.