Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Display external data inside of an Excel 2007 Spread sheet

How can I get Excel 2007 to display the "Date Modified" field of the
worksheet being opened?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Display external data inside of an Excel 2007 Spread sheet

Put the following code in the ThisWorkbook module:

Private Sub Workbook_Open()
Dim objFile As Object
Dim objShell As Object
Dim objFolder As Object

Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.Namespace(ThisWorkbook.Path)

For Each objFile In objFolder.items
Debug.Print objFolder.getdetailsof(objFile, 0)
If objFolder.getdetailsof(objFile, 0) = _
ThisWorkbook.Name Then Exit For
Next objFile
Call MsgBox("Last date modified: " & _
objFolder.getdetailsof(objFile, 3))
End Sub

Save in a macro-enabled file format, enable macros, save and reopen.

On Nov 14, 1:35 pm, jingles457
wrote:
How can I get Excel 2007 to display the "Date Modified" field of the
worksheet being opened?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Display external data inside of an Excel 2007 Spread sheet

Thank you

"ilia" wrote:

Put the following code in the ThisWorkbook module:

Private Sub Workbook_Open()
Dim objFile As Object
Dim objShell As Object
Dim objFolder As Object

Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.Namespace(ThisWorkbook.Path)

For Each objFile In objFolder.items
Debug.Print objFolder.getdetailsof(objFile, 0)
If objFolder.getdetailsof(objFile, 0) = _
ThisWorkbook.Name Then Exit For
Next objFile
Call MsgBox("Last date modified: " & _
objFolder.getdetailsof(objFile, 3))
End Sub

Save in a macro-enabled file format, enable macros, save and reopen.

On Nov 14, 1:35 pm, jingles457
wrote:
How can I get Excel 2007 to display the "Date Modified" field of the
worksheet being opened?




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
Excel 2007 - hyperlink to display external data in a pop-up? cyndiwise notsowise Excel Worksheet Functions 0 October 26th 07 05:33 AM
Excel 2007 spread sheet prints slow. MarcyS Excel Discussion (Misc queries) 1 August 22nd 07 12:40 AM
External Data Tracking in Excel 2007? John Anthony Excel Discussion (Misc queries) 0 August 17th 07 02:09 AM
Excel 2007 and External Data Sources Bettie Claxton Excel Discussion (Misc queries) 0 August 15th 07 04:56 PM
Excel 2007 external data query rbaldwin Excel Discussion (Misc queries) 0 November 8th 06 04:34 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"