Excel properties on worksheet

rafikarp

New Member
Joined
Dec 23, 2008
Messages
21
Hi,

Is there any way to get an excel workbook's updated properties information (that is, author, last date modified, file size etc) to appear on the first sheet in the workbook every time you open it up? Does anyone have a macro that can do this?

Thanks for your help.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
The following comes from VBA's Help for "Workbook.BuiltinDocumentProperties Property", with a few small modifications.

Code:
    Dim p As DocumentProperty
    Dim rw As Long
 
    On Error Resume Next
    rw = 1
    ActiveWorkbook.Worksheets(1).Activate
    For Each p In ActiveWorkbook.BuiltinDocumentProperties
        Cells(rw, 1).Value = p.Name
        Cells(rw, 2).Value = p.Value
        rw = rw + 1
    Next
 
Upvote 0
Hello

Watch:

Code:
'Title: List file properties
'[B]Author:  Eplucheur , mpfe[/B]
'Remarks: Returns all properties of the folder.
Sub Proprieta()
    Dim I As Integer
    Dim txt As String
    On Error Resume Next
    With ThisWorkbook.BuiltinDocumentProperties
    For I = 1 To .Count
    Cells(I, 1) = .Item(I).Name
    Cells(I, 2) = .Item(I)
    Next I
    End With
    Cells(I + 2, 1) = FileLen(ThisWorkbook.FullName) & " octets"
    Columns("A:B").AutoFit
    [B11:B12].NumberFormat = "dd/mm/yyyy hh:mm:ss"
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,828
Messages
6,127,126
Members
449,361
Latest member
VBquery757

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top