I want to run a macro named "Lastrow" when the workbook opens, but when opening the workbook the following error occurs:
Compile error: Sub or Function not defined.
Private Sub Workbook_Open()
Lastrow
End Sub
Note- The vba code "LastRow" is working fine there is no issue only the autorun isnt working



LastRowcode placed ? regular module ? or worksheet module ? can you share the code there? - Shai RadoCallfor removing ambiguity. - JohnyL