![]() |
Last Modified by...
how do I find out who last modified the file that I want to check?
Eg.: I open an Excel-File and want to know, who did the last modification and saved it and when did he/she did that. I want to run a small macro to display the Username in a Textbox on the screen. thanks for your help! Wim-Jan |
Last Modified by...
'----------------------------------------------------------------- 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") -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "WJvanRooijen" wrote in message ... how do I find out who last modified the file that I want to check? Eg.: I open an Excel-File and want to know, who did the last modification and saved it and when did he/she did that. I want to run a small macro to display the Username in a Textbox on the screen. thanks for your help! Wim-Jan |
Last Modified by...
- Goto "Tools-Macro-Visual Basic Editor"
OR simply presss ALT-F11 - Select your excel workbook in "Project Explorer" - Select "ThisWorkBook" - Paste the following code ===================================== Private Sub Workbook_Open() Dim UName, RecPointer UName = InputBox("Name", "Who are you?:") RecPointer = Sheet3.Cells.SpecialCells(xlCellTypeLastCell).Row + 1 Sheet3.Cells(RecPointer, 1) = UName Sheet3.Cells(RecPointer, 2) = Date Sheet3.Cells(RecPointer, 3) = Time End Sub ===================================== I have used "Sheet3" to save user data you can use a different one, replace "Sheet3" with your sheet name *** Please do rate *** "WJvanRooijen" wrote: how do I find out who last modified the file that I want to check? Eg.: I open an Excel-File and want to know, who did the last modification and saved it and when did he/she did that. I want to run a small macro to display the Username in a Textbox on the screen. thanks for your help! Wim-Jan |
Last Modified by...
thanks, that helped to log the last user.
I saw, that I can use this script also to log other data. Very helpfull, thanks a lot! "Bob Phillips" wrote: '----------------------------------------------------------------- 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") -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "WJvanRooijen" wrote in message ... how do I find out who last modified the file that I want to check? Eg.: I open an Excel-File and want to know, who did the last modification and saved it and when did he/she did that. I want to run a small macro to display the Username in a Textbox on the screen. thanks for your help! Wim-Jan |
Last Modified by...
thanks Naveen, that is a very nice idea! I had not thought about that! also
usefull! rgds, Wim-Jan "Naveen" wrote: - Goto "Tools-Macro-Visual Basic Editor" OR simply presss ALT-F11 - Select your excel workbook in "Project Explorer" - Select "ThisWorkBook" - Paste the following code ===================================== Private Sub Workbook_Open() Dim UName, RecPointer UName = InputBox("Name", "Who are you?:") RecPointer = Sheet3.Cells.SpecialCells(xlCellTypeLastCell).Row + 1 Sheet3.Cells(RecPointer, 1) = UName Sheet3.Cells(RecPointer, 2) = Date Sheet3.Cells(RecPointer, 3) = Time End Sub ===================================== I have used "Sheet3" to save user data you can use a different one, replace "Sheet3" with your sheet name *** Please do rate *** "WJvanRooijen" wrote: how do I find out who last modified the file that I want to check? Eg.: I open an Excel-File and want to know, who did the last modification and saved it and when did he/she did that. I want to run a small macro to display the Username in a Textbox on the screen. thanks for your help! Wim-Jan |
All times are GMT +1. The time now is 04:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com