Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Print Modified date stamp on excel sheet | Excel Discussion (Misc queries) | |||
Date Last Modified | Excel Worksheet Functions | |||
Display date modified | Excel Discussion (Misc queries) | |||
How do I add the file last modified date into an Excel header? | Excel Discussion (Misc queries) | |||
How do I enter the date last modified in the footer of an Excel d. | Excel Discussion (Misc queries) |