![]() |
Document Properties - Last Saved, Author
I tried adding the following function (from another post), in order to automate documenting the last date changed/saved and the author:
'----------------------------------------------------- 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 and enter in a cell such as =DocProps ("last author") or =DocProps ("last save time") '-________________________________________________ I entered =DocProps("last author") in a cell, but get a "name" error. Have I placed the Function in the wrong area? Add in problems? Help appreciated. |
Document Properties - Last Saved, Author
Don't know where you placed the function code but it would go into the workbook
in a General Module. To create a General Module, hit ALT + F11 to open the Visual Basic Editor. Hit CRTL + R to open Project Explorer. Find your workbook/project and select it. Right-click and InsertModule. Paste the above code in there. Save the workbook and hit ALT + Q to return to your workbook. Enter the formula as you have below. Gord Dibben Excel MVP On Sat, 2 Sep 2006 19:46:59 +0100, Michael Excel Dude wrote: I tried adding the following function (from another post), in order to automate documenting the last date changed/saved and the author: '----------------------------------------------------- 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 and enter in a cell such as =DocProps ("last author") or =DocProps ("last save time") '-________________________________________________ I entered =DocProps("last author") in a cell, but get a "name" error. Have I placed the Function in the wrong area? Add in problems? Help appreciated. Gord Dibben MS Excel MVP |
All times are GMT +1. The time now is 01:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com