View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ed[_9_] Ed[_9_] is offline
external usenet poster
 
Posts: 194
Default Why is my clipboard empty?

Ouch - I was assuming the code would mimic operator activity, becuse I can
copy, then do other stuff, then pull up Word and manually paste. But it
doesn't surprise me, because I've run into that on other things. Thanks for
the info, Jim.

I was concerned that, because the Selection.Copy action leaves the cells
selected when I paste and do other things, the possibilities of an accident
erasing my data are too great for comfort. Also, before I copy, I have to
do a sort out of the normal data order. So I wanted to reset the sheet
before it got mangled or closed and saved incorrectly. What I did in the
meantime - and it looks like it may be permanent - was to set a message box
right after calling Word; I'm left with Word open so I can do stuff there,
but Excel is waiting in the background with a MsgBox that must be closed
before the data can be touched. I then moved the reset code after the
MsgBox, which will be ok'd after I finish with Word. Does that sound like
the best compromise? Or am I leaving myself open for something?

Ed

"Jim Rech" wrote in message
...
If the macro does almost anything to the sheet after the copy, Excel will
exist copy mode. You should do the copy as late as possible before the
paste.

--
Jim Rech
Excel MVP