Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Last modified user

Does anyone know how I can return the user name who last modified a file via
VB codes in a spreadsheet?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Last modified user

'-----------------------------------------------------------------
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 use

MsgBox DocProps("last author")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"linglc" wrote in message
...
Does anyone know how I can return the user name who last modified a file
via
VB codes in a spreadsheet?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Last modified user

Hi Bob,

I need something like this -- the "Last Modified By" or "Last Author" value
-- but for a given file in a folder without opening it in Excel, and
regardless of what kind of file it is. The FileSystemObject doesn't seem to
support this, crazy as it seems. I've checked the properties of the File
object in Excel VBA Help and it doesn't seem to have anything that matches
this. I've bound the MS Scripting Runtime reference and tried:

LastModBy = FileItem.LastModified
LastModBy = FileItem.LastModifiedBy
LastModBy = FileItem.ModifiedBy
LastModBy = FileItem.Modified
LastModBy = FileItem.LastAuthor
LastModBy = FileItem.Author

All of them fail as soon as I try to step through.

--
Gregg Roberts


"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 use

MsgBox DocProps("last author")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"linglc" wrote in message
...
Does anyone know how I can return the user name who last modified a file
via
VB codes in a spreadsheet?




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
How to change tooltips for user-modified colors? Andy Smith[_2_] Excel Discussion (Misc queries) 1 September 15th 09 12:30 AM
Alert user that row has been modified by changing row color jubu Excel Worksheet Functions 2 June 30th 07 12:46 AM
Do not let user save template if it has been been modified Maddoktor Excel Programming 1 January 17th 07 11:49 PM
Log User Name and Date when userform was run/modified Corey Excel Programming 1 November 21st 06 04:17 AM
Finding name of last user who modified Excel Spreadsheet ibeetb Excel Programming 2 July 29th 04 04:02 PM


All times are GMT +1. The time now is 02:18 AM.

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"