ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tracking workbook user usage (https://www.excelbanter.com/excel-programming/355825-tracking-workbook-user-usage.html)

Darren[_10_]

Tracking workbook user usage
 
Hi,

I have a workbook that sits on the network and can be opened,
read-only, by sales staff.

I need to be able to see when the workbook is opened (read-only) by
each user (each has a different IP).

I dont want to use 'Track Changes' as I dont want to share the
workbook.

Does anybody have some VB that could either update a list or send an
email containing the IP address, date and time, on the open event of
the workbook. I suppose the 'Read-only' asspect is the biggest problem
with this.

Darren


K Dales[_2_]

Tracking workbook user usage
 
The following will create a log file listing the date/time opened and the
Windows user name when the workbook is opened:
Private Sub Workbook_Open()

Open "G:\LogFolder\XLLog.txt" For Append As #1
Print #1, Format(Now, "mm/dd/yy hh:nn") & " " & Environ("User")
Close #1

End Sub

The log file, as you can see, is a text file; you can set its path in the
code as above but it would have to be in a folder accessible by all your
users.
--
- K Dales


"Darren" wrote:

Hi,

I have a workbook that sits on the network and can be opened,
read-only, by sales staff.

I need to be able to see when the workbook is opened (read-only) by
each user (each has a different IP).

I dont want to use 'Track Changes' as I dont want to share the
workbook.

Does anybody have some VB that could either update a list or send an
email containing the IP address, date and time, on the open event of
the workbook. I suppose the 'Read-only' asspect is the biggest problem
with this.

Darren



Darren[_10_]

Tracking workbook user usage
 
absolutely brilliant, thanks very much!

Darren



All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com