Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Get the properties from a closed file

Hi

Does anyone no some way to get the properties Created: , Modified: and
accessed: from a closed excelfile by a VBA macro.

//Lasse






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Get the properties from a closed file

Hi Lasse

See
http://support.microsoft.com/default...;EN-US;Q224351
http://www.cpearson.com/excel/docprop.htm

HTH. Best wishes Harald

"ericsson" skrev i melding
...
Hi

Does anyone no some way to get the properties Created: , Modified: and
accessed: from a closed excelfile by a VBA macro.

//Lasse








  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Get the properties from a closed file

Hi,

You can use code as under - modify the filename with full path, as
needed.

Sub FileProps()
Dim fs
Dim dtCreated As Date, dtModified As Date, dtAccessed As Date
Set fs = CreateObject("Scripting.FileSystemObject")
Set d = fs.GetFile("c:\Book1.xls")
dtCreated = d.DateCreated
dtModified = d.DateLastModified
dtAccessed = d.DateLastAccessed
MsgBox "Created on " & dtCreated & ", Last Modified on " & _
dtModified & ", Last Accessed on " & dtAccessed

End Sub

Sharad



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Referencing closed file TheErick Excel Worksheet Functions 6 January 22nd 09 12:32 AM
Offset on closed file snax500 Excel Discussion (Misc queries) 0 August 4th 06 05:02 PM
Excel is not asking to save a changed file when the file is closed Ron Excel Discussion (Misc queries) 2 March 14th 05 01:05 AM
Reading from a closed file. aking1987 Excel Worksheet Functions 1 November 15th 04 03:48 PM
VBA - on a button event, open another closed file, post changes, close file Fio Excel Programming 0 March 1st 04 01:08 PM


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