![]() |
Tracking changes of login & time
Hi,
I am currently tracking several spreadsheets regarding username who opens it and when. I do this by extracting the username when the person opens the file(workbook open event) However since I store the data on one of the sheets I need to save the workbook every time. This OK when the wbook is shared but I cant use this when a user is read only. Is there a way to track these changes(username and time of usage) without those limitations? Thank you, Ozgur |
Tracking changes of login & time
Hi Ozgur,
obviously you cannot save this information into this workbook. But you can have another file, that you can append with informations you need (username and time of usage). Regards, Ivan |
Tracking changes of login & time
Write it out to a text file.
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ozgur Pars" wrote in message ... Hi, I am currently tracking several spreadsheets regarding username who opens it and when. I do this by extracting the username when the person opens the file(workbook open event) However since I store the data on one of the sheets I need to save the workbook every time. This OK when the wbook is shared but I cant use this when a user is read only. Is there a way to track these changes(username and time of usage) without those limitations? Thank you, Ozgur |
Tracking changes of login & time
Hi Bob,
thanks for the reply (Ivan you too) if I did understand correctly I should open a text file when the user opens this excel spreadsheet save the data on it and close it? Is there a intrinsic excel functionality which records such stuff? The reason I am asking in a recent post saw this function: Function DocProps(prop As String) '----------------------------------------------------------------- Application.Volatile On Error GoTo err_value DocProps = ActiveWorkbook.BuiltinDocumentProperties _ (prop) Exit Function err_value: DocProps = CVErr(xlErrValue) End Function "Bob Phillips" wrote: Write it out to a text file. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ozgur Pars" wrote in message ... Hi, I am currently tracking several spreadsheets regarding username who opens it and when. I do this by extracting the username when the person opens the file(workbook open event) However since I store the data on one of the sheets I need to save the workbook every time. This OK when the wbook is shared but I cant use this when a user is read only. Is there a way to track these changes(username and time of usage) without those limitations? Thank you, Ozgur |
Tracking changes of login & time
Hi Ozgur,
function you mention will not work with workbook open as read-only. You can use text file as Bob suggested (or any other file). If you decide to use text file, explore VBA help for opentextfile method. Regards, Ivan |
Tracking changes of login & time
Hi Ozgur,
now I realized I was not clear. The function should work, but you will not be able to write its output to a file which is open as read-only. Regards, Ivan |
Tracking changes of login & time
Thank you Ivan for your help
Ozgur "Ivan Raiminius" wrote: Hi Ozgur, now I realized I was not clear. The function should work, but you will not be able to write its output to a file which is open as read-only. Regards, Ivan |
Tracking changes of login & time
That is one of my old posts :-)
That function can get you a document property but it has little to do with you ask. You need something like '----------------------------------------------------------------- Private Sub Workbook_Open() '----------------------------------------------------------------- Dim nFile nFile = FreeFile Open "C:\MyLog.txt" For Append As #nFile Print #nFile, "Workbook " & ThisWorkbook.Path & _ " opened by " & Environ("UserName") & _ " on " & Format(Now, "yyyy/mm/dd hh:mm:ss") Close #nFile End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ozgur Pars" wrote in message ... Hi Bob, thanks for the reply (Ivan you too) if I did understand correctly I should open a text file when the user opens this excel spreadsheet save the data on it and close it? Is there a intrinsic excel functionality which records such stuff? The reason I am asking in a recent post saw this function: Function DocProps(prop As String) '----------------------------------------------------------------- Application.Volatile On Error GoTo err_value DocProps = ActiveWorkbook.BuiltinDocumentProperties _ (prop) Exit Function err_value: DocProps = CVErr(xlErrValue) End Function "Bob Phillips" wrote: Write it out to a text file. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ozgur Pars" wrote in message ... Hi, I am currently tracking several spreadsheets regarding username who opens it and when. I do this by extracting the username when the person opens the file(workbook open event) However since I store the data on one of the sheets I need to save the workbook every time. This OK when the wbook is shared but I cant use this when a user is read only. Is there a way to track these changes(username and time of usage) without those limitations? Thank you, Ozgur |
Tracking changes of login & time
Bob sorry didn't remember if it was you or Tom that wrote it...
Thanks again for your kind help... I will have a go at it tomrrow. Have a nice evening. Ozgur "Bob Phillips" wrote: That is one of my old posts :-) That function can get you a document property but it has little to do with you ask. You need something like '----------------------------------------------------------------- Private Sub Workbook_Open() '----------------------------------------------------------------- Dim nFile nFile = FreeFile Open "C:\MyLog.txt" For Append As #nFile Print #nFile, "Workbook " & ThisWorkbook.Path & _ " opened by " & Environ("UserName") & _ " on " & Format(Now, "yyyy/mm/dd hh:mm:ss") Close #nFile End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ozgur Pars" wrote in message ... Hi Bob, thanks for the reply (Ivan you too) if I did understand correctly I should open a text file when the user opens this excel spreadsheet save the data on it and close it? Is there a intrinsic excel functionality which records such stuff? The reason I am asking in a recent post saw this function: Function DocProps(prop As String) '----------------------------------------------------------------- Application.Volatile On Error GoTo err_value DocProps = ActiveWorkbook.BuiltinDocumentProperties _ (prop) Exit Function err_value: DocProps = CVErr(xlErrValue) End Function "Bob Phillips" wrote: Write it out to a text file. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ozgur Pars" wrote in message ... Hi, I am currently tracking several spreadsheets regarding username who opens it and when. I do this by extracting the username when the person opens the file(workbook open event) However since I store the data on one of the sheets I need to save the workbook every time. This OK when the wbook is shared but I cant use this when a user is read only. Is there a way to track these changes(username and time of usage) without those limitations? Thank you, Ozgur |
All times are GMT +1. The time now is 07:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com