View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
cht13er cht13er is offline
external usenet poster
 
Posts: 141
Default Repost: Copy/Paste with format/style

On Apr 10, 11:28*am, JLGWhiz
wrote:
If you do solve the problem, I hope you will post back and share the remedy
with us.



"Rob Parker" wrote:
It seems that my problem is that described in KB917637. *I do notice that
when my code runs, a separate instance of Excel appears in my taskbar. *The
Workbooks.Open method doesn't have any parameter to specify whether the
newly opened workbook should open a new instance of Excel, and (again) I
can't see any obvious option to set this. *Is there a registry setting
involved here? *The KB article simply says that the work-around is to open
both workbooks in a single instance of Excel, but it doesn't say how to do
this (and further searching of the KB has proved fruitless).


Any ideas?


TIA again,


Rob


"Rob Parker" wrote in message
...
Thanks for the comments.


Seems like I'm the only one with this problem. *I've had another careful
look at all the options, and still can't see anything that looks even
vaguely relevant; and there's nothing in my code that has anything ending
with .Enabled = False. *The only other stuff in my code is to set the
various string variables before I start copying. *And, at the moment, I've
got some additional code after the copy operations are complete to tidy up
the new sheet.


C'est la vie ...


Rob


"JLGWhiz" wrote in message
...
Hi Rob, for what it is worth, I formatted a cell in one workbook with
font,
borders and interior color. *Used your code, changing only the workbook
name,
of course, and it copied everything over. *I am using XP xl2003. *I also
tried changing some of the option settings in the edit tab and still got
everything copied over. *You should not be getting those results on your
home
and office sets unless you have something somewhere else in the code you
are
running that turns something off.
You need to check the code for all commands that have an ending of
Enabled =
False to see if that would affect the copy and paste attributes.


"Rob Parker" wrote:


Thanks Chris,


It certainly doesn't work for me - using Excel 2002 at home, or Excel
2003
at work. *That's why I posted the question ;-)


What version of Excel are you using? *Or have I perchance got something
set
wrong - or at least differently to you - *in my Options (not that
there's
anything that grabs my attention as being applicable to this)?


Rob


"cht13er" wrote in message
...
<snip
A manual cut and paste (as well as a manual copy and paste) from one
file to a different file preserves the format for me .... am I missing
something?


ps. if I use your code, which works fine, the formatting is also
copied over ...


Chris- Hide quoted text -


- Show quoted text -


The main thing I understood from the Microsoft post KB917637 was
this: Excel needs to be opened only once for formats to paste.
However, even if I open Excel twice and copy, I can paste the
formats ... in other words, I'm unable to replicate the problem (Excel
2003 SP3).

To check that you have your two workbooks open in the same instance of
Excel, go "Window" and if both files open are listed, you should be OK
(at least by KB917637).

HTH,

Chris