Hi everyone,
I'm trying to troubleshoot a run-time error 91 on a macro in my workbook. Essentially this macro looks through active worksheets to find any issues (special formatted cells in active worksheets) and returns the comments in these formatted cells in a 'issue worksheet' (I hope that makes sense!).
Anyway, i get a 'run-time error 91 - object variable or with block variable not set' issue on the following code line:
It looks like this VBA line is searching for something that doesn't exist (e.g. a previous worksheet which has been deleted) but I've tried to troubleshoot every possible reason/solution and can't remove this error.
Does anyone have any suggestions about what could be causing this?
Thanks in advance for your help.
Cheers,
Bicke.
I'm trying to troubleshoot a run-time error 91 on a macro in my workbook. Essentially this macro looks through active worksheets to find any issues (special formatted cells in active worksheets) and returns the comments in these formatted cells in a 'issue worksheet' (I hope that makes sense!).
Anyway, i get a 'run-time error 91 - object variable or with block variable not set' issue on the following code line:
Code:
iLastRow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
It looks like this VBA line is searching for something that doesn't exist (e.g. a previous worksheet which has been deleted) but I've tried to troubleshoot every possible reason/solution and can't remove this error.
Does anyone have any suggestions about what could be causing this?
Thanks in advance for your help.
Cheers,
Bicke.