Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

user name

11 views
Skip to first unread message

shamir

unread,
Jan 29, 2000, 3:00:00 AM1/29/00
to
hello

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


David McRitchie

unread,
Jan 29, 2000, 3:00:00 AM1/29/00
to
Hi shamir, (posted to programming with email copy)

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...

0 new messages