ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Track when a file has been opened (https://www.excelbanter.com/excel-discussion-misc-queries/155642-track-when-file-has-been-opened.html)

Judy

Track when a file has been opened
 
I have a Shared file so that I can see who made what changes when, but I
would also like to track when the file has been opened, but no changes made.
Is this possible?

Thanks so much!

Gary''s Student

Track when a file has been opened
 
1. create a log sheet called "open log"
2. put the following macro in the ThisWorkbook code area.

(the Save is needed to trap opens w/o saves)

Private Sub Workbook_Open()
Sheets("open log").Activate
Dim n As Long
n = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(n, 1).Value = Now
ActiveWorkbook.Save
End Sub

--
Gary''s Student - gsnu200739


"Judy" wrote:

I have a Shared file so that I can see who made what changes when, but I
would also like to track when the file has been opened, but no changes made.
Is this possible?

Thanks so much!


Judy

Track when a file has been opened
 
I'm sorry, but it doesn't do anything. Perhaps I misunderstood your
instructions.

I created a worksheet and named it Open Log, created the macro in
ThisWorkbook code area and named it Workbook_Open, and copied and pasted your
macro text in it. And nothing happens. I've open and closed the file
several times and even made changes, but nothing appears on the Open Log
worksheet.

I'm obviously missing something, but don't know what it is.


"Gary''s Student" wrote:

1. create a log sheet called "open log"
2. put the following macro in the ThisWorkbook code area.

(the Save is needed to trap opens w/o saves)

Private Sub Workbook_Open()
Sheets("open log").Activate
Dim n As Long
n = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(n, 1).Value = Now
ActiveWorkbook.Save
End Sub

--
Gary''s Student - gsnu200739


"Judy" wrote:

I have a Shared file so that I can see who made what changes when, but I
would also like to track when the file has been opened, but no changes made.
Is this possible?

Thanks so much!



All times are GMT +1. The time now is 04:53 PM.

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