Error message & Close spreadsheet
Posted on 2014-07-17
I have some code that finds a word in column A and deletes any rows above it, if users have not saved down a fresh file, then there will be no rows above that word and you get an application defined or object defined error 1004 as there are no rows to delete, the word will be in row1 !
So it errors here
Can i add an If statement above this line saying if is that error 1004 comes up, a message box appears saying "New monthly file not saved over currentmonth.xls" and then the code quits the current workbook controls.xlsm