Solved

Copy DataViewGrid contents to the Clipboard

Posted on 2009-04-07
3
220 Views
Last Modified: 2012-05-06
I can programmatically select the contents of a Data View Grid by using the following command:

        DataViewGrid1.select

Is there a one- or two-line piece of code that can be used to paste the selection to the clipboard, i.e. it emulates a user pressing [Control][C].?
0
Comment
Question by:rlsokoloff
  • 2
3 Comments
 
LVL 33

Accepted Solution

by:
jppinto earned 125 total points
ID: 24091260
Use the Me.DataGridView1.GetClipboardContent().
0
 

Author Comment

by:rlsokoloff
ID: 24091818
You mean......

     DataViewGrid1.Select
     Clipboard.SetDataObject(Me.DataViewGrid1.GetClipboardContent)

This works.  Thank you.
0
 

Author Closing Comment

by:rlsokoloff
ID: 31567718
It works with a more complete answer below......

     Clipboard.SetDataObject(Me.DataViewGrid1.GetClipboardContent)
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video discusses moving either the default database or any database to a new volume.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now