i want to add the user name from the Tools>Option>General
to a cell or to the footer. can anyone help?
pls send it to my email adress
TIA
shamir
sha...@iec.co.il
sha...@actcom.co.il
Interesting that the cell comment uses username
Tools, Options, General
and differs from the document property
File, Properties, Summary, Author
==================================
=UsernameUnderTools()
Function UsernameUnderTools()
' based on Stéphane Royer 1999-11-12 username used in Tools,Options,General
'http://www.deja.com/=dnc/[ST_rn=ps]/getdoc.xp?AN=551547087
UsernameUnderTools = Application.UserName
End Function
in the footer
ActiveSheet.PageSetup.LeftFooter = Application.UserName & _
chr(10) & ActiveWorkbook.FullName
======================================
-- and the document property -- File, Properties, Summary, Author
=Property("Author")
Function Property(aaa)
'Excel Maintains: Title, Subject, Author, Keywords, Comments,
' Last Author, Application Name, Last Print Date, Creation Date,
' Security, Category, Manager, Company
'Some DejaNews threads: AN=393501043, AN=371066133
'also see Chip Pearson's http://www.cpearson.com/excel/docprop.htm
Property = ActiveWorkbook.BuiltinDocumentProperties(aaa)
End Function
Sub MarkProperties()
'Fills in col a & b, suggest c: =getformula(a1)
rw = 1 'XL95 maintains 13 of the 28 properties listed
For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(rw, 1) = p.Name 'Property() is a user function
Cells(rw, 2).Formula = "=property(""" & p.Name & """)"
rw = rw + 1
Next
End Sub
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://members.aol.com/dmcritchie/excel/excel.htm
shamir <sha...@actcom.co.il> wrote in message news:86u6fb$iim$1...@lnews.actcom.co.il...