file attributes via macro

  • Thread starter Thread starter SUNIL
  • Start date Start date
S

SUNIL

Hi ,

is it possible to get an open excel file's attributes via macro e.g last
modified date or created date.

Thanks
 
Sub testit()
Dim dpr As DocumentProperty

On Error Resume Next
For Each dpr In ActiveWorkbook.BuiltinDocumentProperties
Select Case dpr.Name
Case "Creation date", "Last save time": MsgBox dpr.Name & ": " &
dpr.Value
End Select
Next
End Sub

Rob
 
Sunil,

Look up BuiltinDocumentProperties Property in VBA Help to see what
properties are available.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top