Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
On opening an excel file
pcor,
One way..... Original code from John Walkenbach Open ThisWorkbook.Path & "\Logs\GB.log" For Append As #1 Print #1, Application.UserName, Now, "Opened" Close #1 The above explained (modify at will): 1st Line - Opens a text file named GB.log in a subdirectory named "Logs" underneath the current directory that the workbook was saved in. 2nd Line - Append the UserName, Date & Time and the comment "Opened" to the GB.log file 3rd Line - close and save the GB.log file. Notes.... The directory or subdirectory that you're creating the file in must exist but the file itself doesn't have to exist (it will be vreated the first time and appended to each subsequent time). Place the above code in the Workbook_Open Event or in a regular module and name the sub Auto_Open(). John pcor wrote: I want the program to write the date and time to a file on disk everytime this Excel file is opened. Help please. -- Norton Virus checker 2003 says this email is clean |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Resolve Error in opening Excel File zip file from a CD? | Excel Discussion (Misc queries) | |||
opening a file in Excel starts application but dose not open file | Excel Discussion (Misc queries) | |||
Opening file in Excel 2003 opens multipule instances of same file | Excel Discussion (Misc queries) | |||
opening an excel file opens a duplicate file of the same file | Excel Discussion (Misc queries) | |||
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. | Charts and Charting in Excel |