Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Location
    Lebanon/France
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Get worbook general properties (xl 97)

    High everybody! Great day: my first post on the lounge
    I'm New in VBA but i have already written some little macros
    I maintain a workbook which is updated by different users
    I want to know who has modified it and when :
    in other words (each new last modified date, and by which user)
    As you know, these data appear in File/properties/general
    I would like to automatically fill a column in a sheet of this worbook
    I do not know the syntax neither the commands just to get these informations
    May I receive some help?
    Thanks in adavance

  2. #2
    amandag
    Guest

    Re: Get worbook general properties (xl 97)

    you could try something like this
    Workbooks.Open filename:="Log.xls"
    Sheets("LOG").Select
    Range("A1").Select
    Selection.CurrentRegion.Select
    introw = Selection.CurrentRegion.rows.Count
    introw = introw + 1
    Cells(introw, 1).Value = Application.UserName
    Cells(introw, 2).Value = Now()ActiveWorkbook.Save
    ActiveWorkbook.Close

  3. #3
    Star Lounger
    Join Date
    Aug 2001
    Location
    Lebanon/France
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get worbook general properties (xl 97)

    Thanks for your quick reply,

    In my application,
    - the Now()activeWorbook.save was not recognised as code (red characters)
    - the application.username was successfully tested;
    this one fits well to get the current user
    so I have to include this code in something like an open worbook event
    and by this way I can get automatically the id of each user who open the workbook (if he/she saves it).

    My request was to get the id of the person who modifed (or not) the worbook but saved it.
    There is a property which says "last modified by..." and when that occured.
    How can I get it?

    In a more generic way, my question is,
    how can I retrieve the data displayed by the windows displayed by the command File/Property?

    does it make sense? sorry for my bad english

    dominik

  4. #4
    Lounger
    Join Date
    Jun 2002
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get worbook general properties (xl 97)

    To get the last modified date, you could use
    FileDateTime("FILENAME")

    --cat

  5. #5
    Star Lounger
    Join Date
    Aug 2001
    Location
    Lebanon/France
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get worbook general properties (xl 97)

    thank you Cynthia
    It worked fine

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •