Forum Discussion

LilYawney's avatar
LilYawney
Copper Contributor
Apr 02, 2023
Solved

Runtime error 1004 Application-defined or Object-defined error

I have yet another runtime error; this time it's 1004 instead of 6. Again, this code was originally French and I did not make it myself.

 

 

 

  • LilYawney 

    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()

6 Replies

      • HansVogelaar's avatar
        HansVogelaar
        MVP

        LilYawney 

        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()

Resources