End Sub or End Function must be last statement

Nothing can appear in a Code window below the statement terminating the procedure.  Move all lines below the End Sub or End Function statement into the procedure.