PC Review


Reply
Thread Tools Rate Thread

Date Last Modified

 
 
=?Utf-8?B?RW1tYSBIb3Bl?=
Guest
Posts: n/a
 
      12th Jul 2006
Hi All,

I need to add the 'date last modified' of one spreadsheet into a cell of
another spreadsheet and have it update whenever the spreadsheet is opened.

i.e. in cell A1 of spreadsheet B, i would like to show the date last
modified of spreadsheet A and whenever spreadsheet B is opened it updates so
that if spreadsheet A has been modified, the date updates.

I cannot change spreadsheet A in any way.

If possible i'd like to do this with formulae but if the only solution is in
VBA, please can you be as specific as possible as my vba is weak.

Thanks
Emma
 
Reply With Quote
 
 
 
 
All In
Guest
Posts: n/a
 
      13th Jul 2006

Hi try this bit of code I got from another user. I think we are tryin
to do the same thing. I setit up as a macro. Every time my boss open
the spreed sheet and changes something it puts the date it was update
on the sheet.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Cells(1, 1) = Now

End Sub




I hope this helps you

All I

--
All I
-----------------------------------------------------------------------
All In's Profile: http://www.excelforum.com/member.php...fo&userid=3628
View this thread: http://www.excelforum.com/showthread.php?threadid=56063

 
Reply With Quote
 
=?Utf-8?B?RW1tYSBIb3Bl?=
Guest
Posts: n/a
 
      13th Jul 2006
Thanks for trying but as i said i cannot change spreadsheet A in any way.

Does anyone else have any ideas?

Thanks




"All In" wrote:

>
> Hi try this bit of code I got from another user. I think we are trying
> to do the same thing. I setit up as a macro. Every time my boss opens
> the spreed sheet and changes something it puts the date it was updated
> on the sheet.
>
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
>
> Cells(1, 1) = Now
>
> End Sub
>
>
>
>
> I hope this helps you
>
> All In
>
>
> --
> All In
> ------------------------------------------------------------------------
> All In's Profile: http://www.excelforum.com/member.php...o&userid=36285
> View this thread: http://www.excelforum.com/showthread...hreadid=560635
>
>

 
Reply With Quote
 
=?Utf-8?B?R3JhaGFt?=
Guest
Posts: n/a
 
      19th Jul 2006
Emma,

My VBA is almost certainly weaker than yours - it was non-existent until
about an hour ago! But I realise I'm going to have to bite the bullet some
time and learn to use it, so I've just done a bit of research and I think I
may have solved your problem.

I think this ought to work:

1. Open your spreadsheet B
2. Open the visual basic editor (Alt+F11)
3. In the left-hand pane, click on where it says "VBAProject
(SpreadsheetB.xls)"
3. Insert a new module (Insert > Module)
4. Copy the following, and paste it into the upper-right-hand pane:

Function Date_last_modified(File_path As String)
Application.Volatile
Date_last_modified= FileDateTime(File_path)
End Function

5. Close the visual basic editor (Alt+Q)
6. Type the following into cell A1 of spreadsheet B:

=Date_last_modified("C:\Folder\SpreadsheetA.xls")

(... where C:\Folder\SpreadsheetA.xls is the full path of your spreadsheet A)

7. Reformat the cell as a date (Format > Cells... > Number > Date).

The cell should now show the date that Spreadsheet A was last modified.

I hope this works and is what you were after.

Best wishes,

Graham

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I access date created and date modified for Contacts =?Utf-8?B?cmpiYXJuaGFydA==?= Microsoft Outlook Contacts 1 6th Aug 2007 01:09 PM
Items not archived with modified date older than the date specifie =?Utf-8?B?b29sb25namVu?= Microsoft Outlook Discussion 0 26th Apr 2006 07:10 PM
Change auto archive to received date rather than modified date =?Utf-8?B?S2VubiBG?= Microsoft Outlook Discussion 1 29th Sep 2005 03:21 PM
Windows Explorer - Date Created and Date Modified Matching iltf124 no spam @hotmail.com Windows XP Help 0 4th Feb 2004 04:20 PM
Date Created, Date Modified Changed to Date CD was burned Mark Windows XP General 0 25th Sep 2003 10:03 PM


Features
 

Advertising
 

Newsgroups
 


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