+ Reply to Thread
Results 1 to 6 of 6

Excel Login Form that records date and time of login

  1. #1
    Forum Contributor
    Join Date
    11-14-2004
    Location
    Watford, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    131

    Excel Login Form that records date and time of login

    Hi All,

    I have been looking for a little while now for a way that when an Excel file is opened the user has to enter their username and password before they can open the workbook. I have 3 users at the moment but this may increase. They all have the same privileges so there is no need to hide certain sheets from users (except the login dates). I also need a list of dates and times they logged in on a separate sheet which should only be visible to the username Admin.

    I have seen a YouTube video https://www.youtube.com/watch?v=jnUn2X_Z1WY but this is more than I require.

    Thanks
    Ian

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Excel Login Form that records date and time of login

    I do not normally reply to posts that do not have a sample workbook. However this is a function that other programmers might want to use.

    Irt depends on very hidden sheets and a VB project locked for viewing. These are good enough to keep the casual hackers out. They are not true security. The VB project password is Password.

    The attached workbook has four sheets: Admin, Password, Login Log and Sheet 1. The first three sheets are normally very hidden.

    The Admin sheet has two buttons: one to show the very hidden sheets and another to hide the very hidden sheets. If you are seeing this sheet, the other sheets should also be visible, so the button there is as a backup in case you navigate to this sheet other than by logging in.

    The Password Sheet has a table of user names and passwords. The Admin password is Admin.

    The Login Log Sheet has a list of people and when they logged in.

    When the file is opened, the first thing the program does is hide the sheets that should be hidden. Then it launches a form to get the user name using a drop down list populated by the Password Table. Then they enter the password and click the Login button. If the passwords match then the file remains open. If the password entered doesn't match the one in the table, the file is closed - try again.

    If the user name is Admin (hard coded in the code), then the hidden sheets are revealed. Other passwords are managed through the table.
    Attached Files Attached Files
    Last edited by dflak; 12-30-2023 at 07:02 PM.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    11-14-2004
    Location
    Watford, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    131

    Re: Excel Login Form that records date and time of login

    Thank you dflak.

    Just one further question, is it possible to have the login box show without Excel showing in the background?

    Thanks

  4. #4
    Valued Forum Contributor
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    2021
    Posts
    307

    Re: Excel Login Form that records date and time of login

    Hello @fastcar. My solution is very simple for the average user and very intuitive. Login for Administrator - Admin, password - Admin. The login for a regular User is User, the password is 123. The Admin Sheet is hidden for a regular User. I think you will figure out how to use it yourself. Good luck!
    NOTE: As the original poster/owner, only you can mark your thread as SOLVED (Thread Tools above Post #1).
    You can say "Thanks" in your thread to everyone who offered to help you.
    You can also reward them by clicking * "Add Reputation" under their username on the left.
    With Regards, MikeVol.

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Excel Login Form that records date and time of login

    I can't think of a way to bring the form up separate from the Excel Sheet. The best I know how to do is bring it up on a blank sheet. I could make this a fancy flash screen, possibly with navigation buttons.

  6. #6
    Forum Contributor
    Join Date
    11-14-2004
    Location
    Watford, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    131

    Re: Excel Login Form that records date and time of login

    Thanks Mike

+ 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. [SOLVED] Calculate the difference from the earlies Login time to the Oldest Login time
    By dlealb in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-05-2022, 11:26 AM
  2. [SOLVED] VBA Macro to capture the First Login & Last Logout with Total Login Hours Delivered
    By Yadavgiri in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-08-2020, 01:02 PM
  3. Need help in login vba code to unhide specific sheets depends on login info
    By AlaaEddin95 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2019, 08:19 PM
  4. formula for Early login Time & Late Login Time
    By Rushendra in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2016, 10:22 AM
  5. Any excel formula to get first login and last login data
    By sandesh joshi in forum Excel General
    Replies: 5
    Last Post: 07-11-2014, 11:18 AM
  6. [SOLVED] Login sheet rather than login form?
    By mdovey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2013, 05:17 PM
  7. login and logout time , with total login time ,break> 1 hours
    By shrinivasmj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-12-2013, 05:37 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