Solved

Copy DataViewGrid contents to the Clipboard

Posted on 2009-04-07
3
226 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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