Tracking Users - Excel 2013

mgeiss

New Member
Joined
Sep 12, 2014
Messages
14
Hello,</SPAN>

I was hoping you all could help me. I have a workbook and I need to know who is opening it. I would like to know the username and possible the date, but the date is not crucial. I’m very familiar with excel, but don’t know VBA at all. Could someone walk me through creating a way to track users?</SPAN>

Any help is appreciated!</SPAN>
 
While I have never tried to do this, a possible way to do this would be to capture the username in a hidden sheet (which I have called "Opened By") when they open the workbook. To do this we use the Workbook_Open command as below.

To set this up
Insert new sheet titled 'Opened By'
Add "Name" to cell A1
Add "Time" to cell B1
(Add "Test" to cells A2 and B2)
- otherwise macro will crash :P
Add the vba code below

Please let me know if you need any help with this.


Code:
Private Sub Workbook_Open()

    Sheets("Opened By").Range("A1").End(xlDown).Offset(1, 0).Value = Application.UserName
    Sheets("Opened By").Range("A1").End(xlDown).Offset(1, 1).Value = Now()

    ThisWorkbook.Save

End Sub
 
Upvote 0
I do have one question. Is it possible for this to work without the users enabling macros?
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top