+ Reply to Thread
Results 1 to 8 of 8

Only allowed cells to be filled by double clicking for current time and date

  1. #1
    Registered User
    Join Date
    05-22-2017
    Location
    Los Angeles, USA
    MS-Off Ver
    2013
    Posts
    4

    Only allowed cells to be filled by double clicking for current time and date

    Hi,
    I am working on creating a file to track in time and out time of employees.
    Based on the previous posts here, I am able to write a VBA that will allow the user to double click the cells to show current time and date.
    However, I would like to make sure that nobody can cheat their time by change the time manually on the spreadsheet.
    Is there any VBA that is able to locked the cells that only the double click features allowed in the cells?

    Thank you in advance!!

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: Only allowed cells to be filled by double clicking for current time and date

    .
    .
    The attached is as similar project. In this project, the following macro prevents the users from altering their time :

    Please Login or Register  to view this content.

    Specifically this portion of the macro :

    Please Login or Register  to view this content.

    Perhaps by examining this code you can transpose similar to your macro.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-22-2017
    Location
    Los Angeles, USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Only allowed cells to be filled by double clicking for current time and date

    Thanks!
    I actually have the vba already for double clicking (see below), How can I incorporate the locked with password so that nobody can enter the time manually?
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: Only allowed cells to be filled by double clicking for current time and date

    I am unable to enter the time manually in the attached workbook.

    If you did it by key entry .. how ?

  5. #5
    Registered User
    Join Date
    05-22-2017
    Location
    Los Angeles, USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Only allowed cells to be filled by double clicking for current time and date

    Logit,
    I do not have a lot of experience in VBA.
    The one you attached work fine, but I inherited a file that somebody created, hence I would like to incorporate the lock with password option to the existing vba attached above.

    Thank you

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: Only allowed cells to be filled by double clicking for current time and date

    Please Login or Register  to view this content.
    See the comments to the right of the code lines for Columns K & L. K & L is where the staff will double-click (for this example) to enter their time. The columns can be changed
    in the code to any columns you desire. #11 is Col K ... #12 is Col L (counting from the letter A which is #1).

    There is a way you can leave these two columns as is (double click only) and password protect all the other columns. Refer to this resource :
    https://support.office.com/en-us/art...3-042a5f2cd93a

    Also, for your purposes, the macro code below the above lines of code can be deleted from the project. They don't do anything for your purposes.

    Let me know if you need anything else.

  7. #7
    Registered User
    Join Date
    05-22-2017
    Location
    Los Angeles, USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Only allowed cells to be filled by double clicking for current time and date

    This is great! thank you!

  8. #8
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: Only allowed cells to be filled by double clicking for current time and date

    You are welcome.

    Cheers

+ 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. Class Module for Clicking Shapes to Show Current Time
    By clabulis in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-08-2015, 09:03 AM
  2. VB Help: Double Clicking a cell and different cells pdating
    By nworner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2014, 12:19 AM
  3. [SOLVED] Enter current Time by clicking in cell
    By WFP111 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-14-2013, 08:52 AM
  4. Insert Current date in cell by clicking it
    By DK1981 in forum Excel General
    Replies: 2
    Last Post: 11-10-2011, 08:06 AM
  5. Double clicking cells with formula
    By Snaffler1802 in forum Excel General
    Replies: 2
    Last Post: 08-26-2008, 09:03 AM
  6. double clicking on cells to filter data
    By baz0912 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2008, 09:01 AM
  7. [SOLVED] see the cells the formula relates to by double clicking the cell
    By pvagolfer in forum Excel General
    Replies: 1
    Last Post: 05-15-2005, 08:06 PM

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