Private Sub copyAlltoClipboard() DataGridView1.SelectAll() Dim dataObj As DataObject = DataGridView1.GetClipboardContent() If dataObj IsNot Nothing Then Clipboard.SetDataObject(dataObj) End Sub Private Sub Crew2() copyAlltoClipboard() Dim xlexcel As Excel.Application Dim xlWorkBook As Excel.Workbook Dim xlWorkSheet As Excel.Worksheet xlexcel = New Excel.Application xlexcel.Visible = True xlWorkBook = xlexcel.Workbooks.Open("C:\weg\Jaja.xlsx") xlWorkSheet = xlWorkBook.Worksheets(1) Dim CR As Excel.Range = xlWorkSheet.Cells(12, 3) CR.PasteSpecial() End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)