Forum Discussion
Runtime error 1004 Application-defined or Object-defined error
- Apr 02, 2023
The problem is that NONE of the cells in column A of the Risk Assessment sheet contains "END OF RISKS", so loop never stops until the variable row is greater than the number of rows on the sheet (1048576).
To make it work, column A MUST contain a cell with value "END OF RISKS".
Another point: you have several lines
Clear tab_value()
This should probably be
Erase tab_value()
Here is a copy of the workbook. I'm sure that once you start looking through it you'll realize that there's A LOT wrong with it.
The problem is that NONE of the cells in column A of the Risk Assessment sheet contains "END OF RISKS", so loop never stops until the variable row is greater than the number of rows on the sheet (1048576).
To make it work, column A MUST contain a cell with value "END OF RISKS".
Another point: you have several lines
Clear tab_value()
This should probably be
Erase tab_value()
- LilYawneyApr 02, 2023Copper ContributorI was able to fix this problem but I still have one major problem.
After clicking on the "Create the risk assessment list" button, the page is supposed to automatically change so that I am viewing the Risk Assessment sheet. Not only is it not doing that, but that sheet isn't auto populating the results from the Global Risk Assessment Matrix sheet. Do you know where in my code this error is occurring?- HansVogelaarApr 02, 2023MVP
The next to last line of the macro column_selection (in Module11) is
End:
This makes the code stop completely. Remove that line, it isn't needed.
- LilYawneyApr 02, 2023Copper ContributorThat worked perfectly! Thank you!