protecting clipboard contents

billsox

New Member
Joined
Apr 6, 2002
Messages
7
Hi,

I've got a VB6 application that takes data from an ADO recordset and copies it to an invisible Excel spreadsheet using the Windows clipboard. I've read that this is the fastest way to copy large datasets into an Excel worksheet. My problem is that while this application runs, my users are also using the Windows clipboard in other applications. Thus they can inadvertently change the contents that are pasted into the hidden spreadsheet or are surprised when the data that they are manually pasting is changed to the data that's destined for the spreadsheet. Am I forced to give up on using the clipboard for this data transfer or is there a way of protecting the clipboard contents? Thanks in advance.

Bill
This message was edited by billsox on 2002-04-07 18:54
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi Bill

You have been mislead somewhat, the fastest way (if possible) is to bypass the clipboad altogether. EG

Sheet1.Range("A1:100").Copy Destination:= Sheet2.Range("A65536").end(xlup)

Of course, I am not sure if this can be used in your specific intstance?
 
Upvote 0
On 2002-04-07 19:27, Dave Hawley wrote:
Hi Bill

You have been mislead somewhat, the fastest way (if possible) is to bypass the clipboad altogether. EG

Sheet1.Range("A1:100").Copy Destination:= Sheet2.Range("A65536").end(xlup)

Of course, I am not sure if this can be used in your specific intstance?

I think it can. If my VB6 app saves the recordset to a temporary csv file and then loads that file into Excel, your code can take it from there. I just hope the temp file solution doesn't slow things down too much.

Bill
 
Upvote 0
Just curious why you need a middle man on this one? Why not send it straight to Excel?
Tom
 
Upvote 0

Forum statistics

Threads
1,214,407
Messages
6,119,332
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top