clipboard

Martijn van Dru

Newcomer
Joined
Jun 10, 2003
Messages
23
Hello

I have the following problem. I want to copy data to Excel using the clipboard. But I have problems when I want to copy more than 1 number. Lets say I want to copy 1,2,3 And paste these 3 numbers in Excel, all 3 in a different cell.
when it's possible I want to use the clipboard and not first create an excel application, because then I less flexibel.
I tried already the most stupid things (example below) but I can't handle it
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim i As Integer
        Dim dob As New DataObject()
        For i = 1 To 10
            dob.SetData(i)
        Next
        Clipboard.SetDataObject(dob)
    End Sub
I hope that somebody knows a solution.

Thanks, Martijn
 
Back
Top