Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default log user's who access an excel file

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default log user's who access an excel file

Hi,

Setting aside whether something as unsubtle as this would work or the number
of ways to get around this working, the code below will record the username
of anyone who open the workbook and record the time. I would suggest you
record the information somewhere a little less obvious then column 1 of sheet
1!!

Alt+F11 to open VB editor. Double click 'ThisWorkbook' and paste this code
in on the right

Private Sub Workbook_Open()
With Sheets("Sheet1")
lastrow = .Cells(Rows.Count, "A").End(xlUp).Row + 1
.Cells(lastrow, 1) = Environ("Username")
.Cells(lastrow, 1).Offset(, 1).Value = Now
End With
ActiveWorkbook.Save
End Sub


Mike

"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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default log user's who access an excel file

You can track users by login name if you allow macros to run when the
workbook is opened.

The login name will be placed in a cell on a veryhidden worksheet which only
you can access.

If macros are disabled, make the workbook unusable.


Gord Dibben MS Excel MVP



On Mon, 16 Feb 2009 11:00:14 -0800, 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.


  #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.

Reply
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 08:49 PM.

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

About Us

"It's about Microsoft Excel"