Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date last modified macro


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


--
AH·C
------------------------------------------------------------------------
AH·C's Profile: http://www.excelforum.com/member.php...o&userid=29108
View this thread: http://www.excelforum.com/showthread...hreadid=488304

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Date last modified macro

Hi Leon,

You also have a response to your post in Excel.


---
Regards,
Norman


"Leon" wrote in message
oups.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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Date last modified macro

thanks alot bro ill try it right now

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Date last modified macro

Thanks

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
Modified Date D Excel Discussion (Misc queries) 12 February 12th 07 01:39 PM
Date Last Modified Emma Hope Excel Worksheet Functions 3 July 19th 06 09:06 PM
date that a row is modified vaderj Excel Discussion (Misc queries) 1 April 24th 06 10:59 PM
modified date Monty New Users to Excel 1 June 6th 05 12:50 PM
Modified Date DME New Users to Excel 11 December 14th 04 07:15 PM


All times are GMT +1. The time now is 05:48 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"