Solved

Copy DataViewGrid contents to the Clipboard

Posted on 2009-04-07
3
227 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

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 …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

690 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