Closed Thread
Results 1 to 16 of 16

track users who open excel file

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    track users who open excel file

    Is there a way to track/log users who open an excel file and also keep it very hidden? Thanks.
    Last edited by maacmaac; 11-24-2010 at 12:57 PM.

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: track users who open excel file

    Hi

    I am not sure what you need exactly, but you can use the workbook open and close events to achieve what I think you need.

    With workbook close hide all sheets that you do not want visible and save before close.
    With workbook open re-hide (in case of disabling vba or crashes), call custom form for password verification, unhide if password correct, log users. Can be as simple or detailed as necessary (e.g limit attempts).

    Regards

    Jeff

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: track users who open excel file

    If it's on a server, you could use the file auditing features in Windows. If you use VBA you are reliant on people enabling macros when they open it.
    Remember what the dormouse said
    Feed your head

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: track users who open excel file

    As romperstomper says, this is reliant on macros being enabled on opening
    Please Login or Register  to view this content.

    To view the sheet enter this in the Immediate pane of the VBa editor
    Please Login or Register  to view this content.
    Press Return

    When you have finished viewing the log either enter this in the Immediate pane
    Please Login or Register  to view this content.
    Press Return
    or just close the file.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Re: track users who open excel file

    That works great but I forgot that some of the users will have read only access to the file. I still want to log users that are trying to access the file but I need a way to save the data in the log file. Is there a way to save the file in read-only access? I tried to modify the code to save but keep getting a run-time error. Thanks
    Please Login or Register  to view this content.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: track users who open excel file

    No, you will have to write to another file in that case.

  7. #7
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Re: track users who open excel file

    Thanks for tip. I think I can actually do a work around in which users can open without having to use read only. I will most likely add protection within the workbook and would still be able to accomplish what I need. Thanks.

  8. #8
    Registered User
    Join Date
    03-24-2011
    Location
    Illinios
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: track users who open excel file

    Thanks for this code--it's the perfect solution for something that I've been asked to do!
    Last edited by sandywinkelman; 03-24-2011 at 09:42 AM.

  9. #9
    Registered User
    Join Date
    01-14-2015
    Location
    Sri Lanka
    MS-Off Ver
    2010
    Posts
    8

    Re: track users who open excel file

    Hi,

    I'm also looking for a solution for the same issue that Sandy wanted. If I want to maintain this log in a seperate excel, how this code should be amended?

    Thanks.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: track users who open excel file

    Logasai welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  11. #11
    Forum Contributor
    Join Date
    04-29-2012
    Location
    nuneaton, England
    MS-Off Ver
    Excel 2007
    Posts
    366

    Re: track users who open excel file

    When my workbook opens, i set it to send an email to me automatically, is this something that would work for you?

  12. #12
    Registered User
    Join Date
    01-14-2015
    Location
    Sri Lanka
    MS-Off Ver
    2010
    Posts
    8

    Re: track users who open excel file

    Hi Wayneg,

    There are several users who work with this workbook daily. So I don't think e-mail notification would be a good solution as my main purpose is to know the exact person who has opened the workbook so I or the user can check with that person and do any changes to the workbook. As the number of users are high, it's really painful when someone opens it keep without closing for a long time and if anyone wanted to work with the workbook, that person need to goo around the team ans aks who opened the excel...

  13. #13
    Registered User
    Join Date
    02-21-2016
    Location
    Cincinnati
    MS-Off Ver
    Office 2015
    Posts
    1

    Re: track users who open excel file

    I've been using this code with great success in my classes, but there is one problem that keeps cropping up. When a student uses a Mac, most of the data aside from date and time is blank. Can anyone advise on how to make the code expose Mac user data as well?

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: track users who open excel file

    rlmeyers welcome to the forum

    Perhaps you missed my post #10?

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  15. #15
    Registered User
    Join Date
    05-18-2023
    Location
    London
    MS-Off Ver
    MS 365
    Posts
    1

    Re: track users who open excel file

    hi wayneg, could you please show me how to do this?

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: track users who open excel file

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

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

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