![]() |
Help pLease... Creating a Usage Log
I am trying to create a usage log, below is the code:
Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Application.UserName, Now Close #1 End Sub However, I don't know where the log is stored therefore am not sure if it is working. Would someone be able to help me? Your guidance will be greatly appreciated. Thank you, J.B. |
Help pLease... Creating a Usage Log
The usage.log file is stored in the folder from which you opened the workbook
I tested the code and it works. The code creates the file on first open then appends username and date/time each time the workbook is opened. Find it in the folder and open with NotePad to check. Gord Dibben MS Excel MVP On Mon, 3 Dec 2007 17:00:02 -0800, Alpineman2 wrote: I am trying to create a usage log, below is the code: Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Application.UserName, Now Close #1 End Sub However, I don't know where the log is stored therefore am not sure if it is working. Would someone be able to help me? Your guidance will be greatly appreciated. Thank you, J.B. |
Help pLease... Creating a Usage Log
Gord Dibben,
Thank you, I feel stupid now, should have noticed the usage log right in front of my face. "Gord Dibben" wrote: The usage.log file is stored in the folder from which you opened the workbook I tested the code and it works. The code creates the file on first open then appends username and date/time each time the workbook is opened. Find it in the folder and open with NotePad to check. Gord Dibben MS Excel MVP On Mon, 3 Dec 2007 17:00:02 -0800, Alpineman2 wrote: I am trying to create a usage log, below is the code: Private Sub Workbook_Open() Open ThisWorkbook.Path & "\usage.log" For Append As #1 Print #1, Application.UserName, Now Close #1 End Sub However, I don't know where the log is stored therefore am not sure if it is working. Would someone be able to help me? Your guidance will be greatly appreciated. Thank you, J.B. |
All times are GMT +1. The time now is 04:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com