Link to home
Start Free TrialLog in
Avatar of rlsokoloff
rlsokoloff

asked on

Copy DataViewGrid contents to the Clipboard

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].?
ASKER CERTIFIED SOLUTION
Avatar of jppinto
jppinto
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rlsokoloff
rlsokoloff

ASKER

You mean......

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

This works.  Thank you.
It works with a more complete answer below......

     Clipboard.SetDataObject(Me.DataViewGrid1.GetClipboardContent)