View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Ming[_2_] Ming[_2_] is offline
external usenet poster
 
Posts: 14
Default How to copy/paste without using clipboard?

Hi JP, the problem with using Office clipboard is that it alreays shares the
last item with the Windows clipboard. Essentially, Windows clipboard is also
altered when you copy anything to office clipboard.

My problem is primarily that user in foreground cannot use their clipboard
as usual (Who can give up the copy/paste nowadays?). And, it would be a big
issue if Excel gets wrong data pasted into the report. Data security is not a
problem for me.





"JP" wrote:

To the OP: Use the Office Clipboard instead. See
http://blogs.techrepublic.com.com/msoffice/?p=544

Mike: I think the problem is either that the worksheet might have
sensitive data on it, which when copied, is available publicly via the
Windows clipboard (hence the comment by the OP: "the content in
Windows clipboard which can be shared by other applications"), or that
Excel VBA is running while the user completes other tasks, and the
clipboard is unavailable to that user because it is being used by VBA
(hence the comment by the OP: "which makes the Window clipboard
unusable for the user working in foreground.")

I'm curious to know which is correct.

--JP

On Oct 2, 2:45 pm, Mike H wrote:
Hi,

Apart from saying there is a problem in using the clipboard you never quite
got around to telling us what that problem is.

Anyway, this doesn't use the clipboard

Sheet2.Range("A1:a100").copy Sheet1.Range("B1")

Mike



"Ming" wrote:
I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.


There are two ways you can copy/paste data around in Excel.


One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.


There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.


There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.


Anybody is aware of workaround for this problem?- Hide quoted text -


- Show quoted text -