If date greater than help please

  • Hello all

    need help on the below please

    i need a macro that stops running once a certain date has passed

    so for example.

    A1 has = today()

    if A1 > "10/03/2021" stop macro


  • Hello and Welcome to the Forum :)

    You can adapt the following macro to your specific situation

     Sub TestDate()
        If Range("A1") > CDate("10/03/2021") Then
            MsgBox "STOP": Exit Sub
            MsgBox "Continue ...."
        End If
    End Sub

    Hope this will help


    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!