Results 1 to 3 of 3

Thread: Excel Dates

  1. #1
    Join Date
    Aug 2010
    Location
    California
    Posts
    8

    Unanswered: Excel Dates

    I have created a form with an automatic date function. When form is opened the function Today() auto enters the date in the top of the form. I want to lock this date so it does not change when the form is opened on subsequent dates. I cannot find a solution using the help function. Can anyone help
    Thanks

    Gene

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi Gene

    TODAY() is volatile so it will continue to recalculate on subsequent dates. Your only option is to put the date in the cell as a constant.

  3. #3
    Join Date
    Mar 2011
    Location
    Amsterdam, NL
    Posts
    6

    Excel Dates

    Or simply use an If statement to check this.

    Code:
    If Range("A1").Value = "" Then Range("A1").Value = Date
    On subsequent dates, the date in cell A1 will not change, because cell A1 is not empty anymore.

    (I used the Date function in VBA to return the Date without the time).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •