Tracking users who open my workbook - part 2

  • Thread starter Fred Flintstone
  • Start date
F

Fred Flintstone

Sorry ... continuation of my previous e-mail.

The hidden worksheet or separate workbook to be set up for example ... so
username is in column A, date column B and time in column C.
 
F

Fabian

Fred Flintstone hu kiteb:
Sorry ... continuation of my previous e-mail.

The hidden worksheet or separate workbook to be set up for example
... so username is in column A, date column B and time in column C.

What's to stop someone from copying the file and viewing it locally, or
viewing it without making changes? It is quite easy for a given user to
see the contents without forcing a save.
 
B

Bernie Deitrick

Fred,

Put this in the Thisworkbook's codemodule. Assumes you have a
worksheet named "User Data" in the same workbook. Otherwise, you
would need to open a second workbook for the data storage, which is
more complicated.

Private Sub Workbook_Open()
With ThisWorkbook.Worksheets("User Data")
.Range("A65536").End(xlUp)(2).Value = Application.UserName
.Range("B65536").End(xlUp)(2).Value = Date
.Range("C65536").End(xlUp)(2).Value = Time
End With

End Sub

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top