Hi guys I need help in deleting rows in Excel. What I want is if I delete a row in DataGridView it will also delete a row with the same value. I tried using the OleDb way and I find out I can't delete a row using that so I tried using the Interop way still no luck, worse the excel file I used can't be close. It says "Object variable or With block variable not set". After I reboot my laptop it didn't delete the row
xlWorkBook = xlApp.Workbooks.Open(path)
xlWorkSheet.DeleteRow(b)
xlWorkBook.Save()
xlWorkBook.Close()