+ Reply to Thread
Results 1 to 8 of 8

Insert Date and Lock

  1. #1
    Registered User
    Join Date
    08-09-2019
    Location
    Leicester, England
    MS-Off Ver
    Excel for O365
    Posts
    12

    Insert Date and Lock

    Hi all,

    I need to add today's date to a cell 2 columns away from a drop down selection.

    I also need that date to remain locked and not change as it would by using TODAY()

    This is the code I've come up with so far but it doesn't work

    Please Login or Register  to view this content.
    There are 4 option available to select from the dropdown in column "10" Only one of those selections needs to add the date to column "12". The others should leave the cell blank.

    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Insert Date and Lock

    See attached sample file.
    Your code seems to be working fine.
    The one question I would have is:
    What happens after someone changes a choice from Closed to something else?
    Do you want the date to remain or cleared?
    Attached Files Attached Files
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Insert Date and Lock

    Why Case statement
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Insert Date and Lock

    Quote Originally Posted by sintek View Post
    Why Case statement
    Please Login or Register  to view this content.
    I saw that as well but left it alone in case OP wants to add other code under different choices.

  5. #5
    Registered User
    Join Date
    08-09-2019
    Location
    Leicester, England
    MS-Off Ver
    Excel for O365
    Posts
    12

    Re: Insert Date and Lock

    Quote Originally Posted by modytrane View Post
    See attached sample file.
    Your code seems to be working fine.
    The one question I would have is:
    What happens after someone changes a choice from Closed to something else?
    Do you want the date to remain or cleared?
    IN answer to you question: Yes I would like it to clear the date if another option is selected after "Closed". It is entirely possible that the user could select "Closed" by mistake.

  6. #6
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Insert Date and Lock

    So use this code:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-09-2019
    Location
    Leicester, England
    MS-Off Ver
    Excel for O365
    Posts
    12

    Re: Insert Date and Lock

    Perfect. Thanks for your help guys.

  8. #8
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Insert Date and Lock

    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Insert image and lock aspect ratio
    By tangsunx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-08-2019, 10:37 AM
  2. [SOLVED] Insert and lock today's date when data entered into cell A2
    By nellyc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2015, 03:53 AM
  3. How do I lock picture that I insert in worksheet
    By jamshoot in forum Excel General
    Replies: 0
    Last Post: 07-10-2013, 09:55 AM
  4. [SOLVED] Need to insert N/A and lock duplicate rows
    By anwaee2 in forum Excel General
    Replies: 0
    Last Post: 09-15-2012, 05:52 PM
  5. Replies: 3
    Last Post: 11-15-2010, 08:26 PM
  6. Insert calendar result into lock cell
    By emussynski in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-02-2008, 06:51 AM
  7. Insert date then lock cell!
    By mevetts in forum Excel General
    Replies: 4
    Last Post: 12-21-2005, 06:23 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1