Function WrapEntireRowDelete(wbkname, sheetname, rowTodelete) 'This is a wrapper for deleting a row to prevent accidental deletion 'must pass the 3 params If ActiveWorkbook.Name <> wbkname Then WrapEntireRowDelete = "error: not on the passed workbook '" & wbkname & "'" Exit Function End If
If ActiveSheet.Name <> sheetname Then WrapEntireRowDelete = "error: not on propper sheet name '" & sheetname & "'" Exit Function End If
Rows(rowToDelete).EntireRow.Delete WrapEntireRowDelete = "ok" End Function