Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to record history of Excel files
Dear All,
I am trying to work out a macro in Excel to record a history of excel files that are created, modified and accessed. I have tried to use personal.xls to do this, however, it always generates error like this, but it is very easy to impliment it in word VBA: In Excel: personal.xls workbook: Const Rec = "C:\Excel_documnet_record.txt" Public Sub Workbook_Open() dim Record_Str Record_Str= Record_Str & vbTab & "-Opened" & vbTab & Application.Workbooks(2).Path & "\" & Application.Workbooks(2).Name Open Rec For Append As #1 Print #1, Record_Str Close #1 End Sub Error message: Runtime error 9 However if it is MS word, Similar macro works: Private Sub Document_Open() Dim a a = Now() a = a & vbTab & "-Opened" & vbTab & Me.Path & "\" & Me.Name Open Rec For Append As #1 Print #1, a Close #1 End Sub ==== I actually want to make similar macros to powerpoint also, but it seems there is no way at all. Any suggestion will be highly appreciated! Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Tracking history of Office files chronologically | Excel Discussion (Misc queries) | |||
Record macro doesn't record shape properties | Excel Programming | |||
Merge files blocked by change history and "sufficient amount of ti | Excel Discussion (Misc queries) | |||
How do I record a macro which should work on multiple files ? | Excel Discussion (Misc queries) | |||
Record Macro - Record custom user actions | Excel Programming |