![]() |
How to find the owner of the active excel workbook
Dear Smart People,
I'm sure this has been asked before but I'm not able to find the answer. In Visual Basic, how may I find the name or system ID of the owner of the currently active workbook? I apologize if this is an "old" question but I've not been able to gleen the answer. Thank you! Janet |
How to find the owner of the active excel workbook
Take a look at the BuiltInDocumentProperties to see if you can find what you
want there. I'm not sure you can get the "Owner", but you can find who last modified the document. -- HTH, Barb Reinhardt "Janet Panighetti" wrote: Dear Smart People, I'm sure this has been asked before but I'm not able to find the answer. In Visual Basic, how may I find the name or system ID of the owner of the currently active workbook? I apologize if this is an "old" question but I've not been able to gleen the answer. Thank you! Janet |
How to find the owner of the active excel workbook
Define the "owner". What are you looking for? HTH Otto
"Janet Panighetti" wrote in message ... Dear Smart People, I'm sure this has been asked before but I'm not able to find the answer. In Visual Basic, how may I find the name or system ID of the owner of the currently active workbook? I apologize if this is an "old" question but I've not been able to gleen the answer. Thank you! Janet |
How to find the owner of the active excel workbook
Take a look at the BuiltInDocumentProperties to see if you can find what you
want there. I'm not sure you can get the "Owner", but you can find who last modified the document. -- HTH, Barb Reinhardt "Janet Panighetti" wrote: Dear Smart People, I'm sure this has been asked before but I'm not able to find the answer. In Visual Basic, how may I find the name or system ID of the owner of the currently active workbook? I apologize if this is an "old" question but I've not been able to gleen the answer. Thank you! Janet |
How to find the owner of the active excel workbook
Maybe "Author" from Properties?
Sub test() MsgBox ActiveWorkbook.BuiltinDocumentProperties("Author") End Sub Gord Dibben MS Excel MVP On Tue, 22 Dec 2009 17:49:51 -0500, "Otto Moehrbach" wrote: Define the "owner". What are you looking for? HTH Otto "Janet Panighetti" wrote in message ... Dear Smart People, I'm sure this has been asked before but I'm not able to find the answer. In Visual Basic, how may I find the name or system ID of the owner of the currently active workbook? I apologize if this is an "old" question but I've not been able to gleen the answer. Thank you! Janet |
How to find the owner of the active excel workbook
This macro (GetWorkbookProperties) will give you a message box with the
Workbook properties. -- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown '/=======================================/ ' Sub Purpose: List Workbook Properties to Msgbox ' both Built-in and Custom ' 01/24/2000 '/=======================================/ ' Sub GetWorkbookProperties() Dim objProperty As Object Dim strAnswer As String On Error Resume Next 'List Workbook name and size strAnswer = "Workbook: " & _ " " & Excel.ActiveWorkbook.name & vbCr & _ Excel.ActiveWorkbook.FullName & vbCr & _ " - Workbook File Size: " & _ Format(FileLen(Excel.ActiveWorkbook.FullName) / 1024, _ "#,##0") & " kb" & vbCr 'List Builtin Document Properties For Each objProperty In _ ActiveWorkbook.BuiltinDocumentProperties With objProperty strAnswer = strAnswer & vbCr & _ "Builtin - " & .name & " : " & .value End With Next 'List Custom Document Properties For Each objProperty In _ ActiveWorkbook.CustomDocumentProperties With objProperty strAnswer = strAnswer & vbCr & _ "Custom - " & .name & " : " & .value End With Next MsgBox strAnswer exit_Sub: On Error Resume Next Exit Sub err_Sub: Debug.Print "Error: " & Err.Number & " - (" & _ Err.Description & _ ") - " & Now() GoTo exit_Sub End Sub '/=======================================/ |
All times are GMT +1. The time now is 11:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com