LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default log user's who access an excel file

You would need to capture the information immediately after a user opened the
file, otherwise the file could be opened, data copy, and the file closed
without saving. Include a special tab called "log". Enter the following
event macro in the wrokbook code area:

Private Sub Workbook_Open()
Sheets("log").Activate
If Range("A1").Value = "" Then
n = 1
Else
n = Cells(Rows.Count, "A").End(xlUp).Row + 1
End If
Cells(n, "A").Value = Environ("username")
Cells(n, "b").Value = Date
ActiveWorkbook.Save
Sheets("Sheet1").Activate
End Sub

Lets make sure its in the correct place.

Because it is workbook code, it is very easy to install and use:

1. right-click the tiny Excel icon just to the left of File on the Menu Bar
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (workbook code), see:

http://www.mvps.org/dmcritchie/excel/event.htm

--
Gary''s Student - gsnu200834


"kj1977" wrote:

Is there any way to trace or log users who open an excel file on our shared
server? We have reason to believe that someone who we trust is passing
confidential infromation to outside sources about our business numbers and
would like to track who is in that file and when etc. Trying to sniff out a
rat basically.
Thanks in advance.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get a user's user id in an Excel macro GEP Excel Worksheet Functions 3 May 2nd 23 07:42 PM
excel user's manual Doug Excel Discussion (Misc queries) 3 December 2nd 08 05:59 PM
Excel home and student user's manual? Tandemphil Excel Discussion (Misc queries) 1 June 6th 07 07:48 PM
Importing EXCEL file into access schleppy2 Excel Discussion (Misc queries) 1 March 13th 06 09:22 PM
Excel allows access to more than one user to same file Bernie G Excel Discussion (Misc queries) 2 March 8th 06 09:03 AM


All times are GMT +1. The time now is 03:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"