#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 100
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Modified date stamp on excel sheet Marc Excel Discussion (Misc queries) 2 September 8th 06 02:51 PM
Date Last Modified Emma Hope Excel Worksheet Functions 3 July 19th 06 09:06 PM
Display date modified Curious Excel Discussion (Misc queries) 2 July 13th 06 12:34 PM
How do I add the file last modified date into an Excel header? John_Ostar Excel Discussion (Misc queries) 3 October 10th 05 10:20 PM
How do I enter the date last modified in the footer of an Excel d. Last modified date in footer Excel Discussion (Misc queries) 1 February 6th 05 11:12 PM


All times are GMT +1. The time now is 01:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"