+ Reply to Thread
Results 1 to 5 of 5

Date last modified macro

Hybrid View

Guest Date last modified macro 11-25-2005, 11:20 PM
AH·C In your Microsoft Excel... 11-26-2005, 12:03 AM
Guest Re: Date last modified macro 11-26-2005, 06:25 PM
Guest Re: Date last modified macro 11-26-2005, 12:30 AM
Guest Re: Date last modified macro 11-26-2005, 06:25 PM
  1. #1
    Leon
    Guest

    Date last modified macro

    Hi guys,

    I am wondering if there is a function or maro i can write in excel that
    can show the date my .xls fle was last modified?

    So i need it to only change when any cells are changed with in the
    workbook but if the workbook is opened and just viewed at, the date
    will not change. I know that information is in the properties of the
    file but i need it to get that info and put it in a cell.

    Thanks for the help.


  2. #2
    Registered User
    Join Date
    11-25-2005
    Posts
    23
    In your Microsoft Excel Objects >> ThisWorkbook, insert this

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Range("A1") = Date 'format your cell to reflect your desired date/time display
    End Sub

    Granted this happens only when the wb is saved, if you want it for anytime a cell is changed, you will have to experiment with other built in events.

    Particularly, you may need to "Dim x as string" to grab the current value on open and have it reuse that value, in the event that, altho the wb is saved, no changes were made.

    HTH
    Last edited by AH·C; 11-26-2005 at 12:08 AM.

  3. #3
    Leon
    Guest

    Re: Date last modified macro

    thanks alot bro ill try it right now


  4. #4
    Norman Jones
    Guest

    Re: Date last modified macro

    Hi Leon,

    You also have a response to your post in Excel.


    ---
    Regards,
    Norman


    "Leon" <arthurk192@gmail.com> wrote in message
    news:1132975131.735568.255890@g14g2000cwa.googlegroups.com...
    > Hi guys,
    >
    > I am wondering if there is a function or maro i can write in excel that
    > can show the date my .xls fle was last modified?
    >
    > So i need it to only change when any cells are changed with in the
    > workbook but if the workbook is opened and just viewed at, the date
    > will not change. I know that information is in the properties of the
    > file but i need it to get that info and put it in a cell.
    >
    > Thanks for the help.
    >




  5. #5
    Leon
    Guest

    Re: Date last modified macro

    Thanks


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1