ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel document propeties in Cells (https://www.excelbanter.com/excel-discussion-misc-queries/152703-excel-document-propeties-cells.html)

e-csl

Excel document propeties in Cells
 
Is there any way of showing Excel document properties in cells?

For example, I´d like to show the Title property in a cell.

Thanks.

Carlos.


Arvi Laanemets

Excel document propeties in Cells
 
Hi

Maybe UDF like this will do:

Public Function ShowPropertie(strProp As String)
Select Case strProp
Case "Author"
WBProp = ThisWorkbook.Author
Case "FileFormat"
WBProp = ThisWorkbook.FileFormat
Case "FullName"
WBProp = ThisWorkbook.FullName
Case "Name"
WBProp = ThisWorkbook.Name
Case "Path"
WBProp = ThisWorkbook.Path
Case "ReadOnly"
WBProp = ThisWorkbook.ReadOnly
Case "RevisionNumber"
WBProp = ThisWorkbook.RevisionNumber
Case "Title"
WBProp = ThisWorkbook.Title
Case "ActivePrinter"
WBProp = Application.ActivePrinter
Case "Calculation"
WBProp = Application.Calculation
Case "OrganizationName"
WBProp = Application.OrganizationName
Case "UserName"
WBProp = Application.UserName
End Select
End Function


Copy the UDF into your workbook module, and into any cell enter the formula
like
=WBPROP("UserName")



--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"e-csl" wrote in message
...
Is there any way of showing Excel document properties in cells?

For example, I´d like to show the Title property in a cell.

Thanks.

Carlos.




reklamo

Excel document propeties in Cells
 
For a simple listing of the properties try following code. You find the
according numbers to any property in the HELP.

Sub ReadWorkbookProperties()
Cells(1, 1).Value = ActiveWorkbook.Name
For i = 1 To 30
On Error Resume Next
Cells(i + 1, 1).Value = ActiveWorkbook.BuiltinDocumentProperties(i)
Next
End Sub

Regards
reklamo


"Arvi Laanemets" wrote:

Hi

Maybe UDF like this will do:

Public Function ShowPropertie(strProp As String)
Select Case strProp
Case "Author"
WBProp = ThisWorkbook.Author
Case "FileFormat"
WBProp = ThisWorkbook.FileFormat
Case "FullName"
WBProp = ThisWorkbook.FullName
Case "Name"
WBProp = ThisWorkbook.Name
Case "Path"
WBProp = ThisWorkbook.Path
Case "ReadOnly"
WBProp = ThisWorkbook.ReadOnly
Case "RevisionNumber"
WBProp = ThisWorkbook.RevisionNumber
Case "Title"
WBProp = ThisWorkbook.Title
Case "ActivePrinter"
WBProp = Application.ActivePrinter
Case "Calculation"
WBProp = Application.Calculation
Case "OrganizationName"
WBProp = Application.OrganizationName
Case "UserName"
WBProp = Application.UserName
End Select
End Function


Copy the UDF into your workbook module, and into any cell enter the formula
like
=WBPROP("UserName")



--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"e-csl" wrote in message
...
Is there any way of showing Excel document properties in cells?

For example, I´d like to show the Title property in a cell.

Thanks.

Carlos.





e-csl

Excel document propeties in Cells
 
Thank you very much. I'll have a try.

Thanks.

Carlos

"Arvi Laanemets" wrote:

Hi

Maybe UDF like this will do:

Public Function ShowPropertie(strProp As String)
Select Case strProp
Case "Author"
WBProp = ThisWorkbook.Author
Case "FileFormat"
WBProp = ThisWorkbook.FileFormat
Case "FullName"
WBProp = ThisWorkbook.FullName
Case "Name"
WBProp = ThisWorkbook.Name
Case "Path"
WBProp = ThisWorkbook.Path
Case "ReadOnly"
WBProp = ThisWorkbook.ReadOnly
Case "RevisionNumber"
WBProp = ThisWorkbook.RevisionNumber
Case "Title"
WBProp = ThisWorkbook.Title
Case "ActivePrinter"
WBProp = Application.ActivePrinter
Case "Calculation"
WBProp = Application.Calculation
Case "OrganizationName"
WBProp = Application.OrganizationName
Case "UserName"
WBProp = Application.UserName
End Select
End Function


Copy the UDF into your workbook module, and into any cell enter the formula
like
=WBPROP("UserName")



--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"e-csl" wrote in message
...
Is there any way of showing Excel document properties in cells?

For example, I´d like to show the Title property in a cell.

Thanks.

Carlos.






All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com