Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
limited usage | Excel Programming | |||
100% cpu usage | Excel Discussion (Misc queries) | |||
Cursor Usage | Excel Discussion (Misc queries) | |||
SQL - TOP 1 Usage | Excel Programming | |||
Command Usage | Excel Programming |