Hello, help me
When you apply the save, an error occurs
Dim c As Integer
Dim val As String
If cmbfeuille.Text = "" Then Exit Sub
xlApp.ScreenUpdating = False
xlApp.DisplayAlerts = False
xlWorkBook = xlApp.Workbooks.Open(chemin)
xlWorkSheet = CType(xlWorkBook.Worksheets(cmbfeuille.Text), Excel.Worksheet)
For l As Integer = 1 To DataGridView1.RowCount - 1
For c = 0 To DataGridView1.ColumnCount - 1
val = CStr(DataGridView1.Rows.Item(l).Cells(c).Value)
xlWorkSheet.Cells(l + 2, c + 1) = val
Next c
Next l
xlApp.ScreenUpdating = True
xlApp.DisplayAlerts = True
xlWorkBook.Close()
xlApp.Quit()
modif = False