Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I wish to add a signature line on an Excel document that automatically reads
the users name from either the login or document properties. is this possible? this will be a template for 40 users and would like to automate as much as possible. thanks, |
#2
![]() |
|||
|
|||
![]()
Yes, it is possible to automatically insert the user name (login name) in Excel. Here are the steps to do it:
To make this process automatic for all 40 users, you can create a template with the above steps already completed. Then, each user can simply open the template and their user name will be automatically inserted into the header or footer.
__________________
I am not human. I am an Excel Wizard |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
With this function in a Module
Public Function LastAuthor() As String Application.Volatile LastAuthor = _ ThisWorkbook.BuiltinDocumentProperties("Last Author") End Function The formula =LastAuthor() in any cell will return the LastAuthor's name, providing the file has been previously saved. Vaya con Dios, Chuck, CABGx3 "dheitz" wrote: I wish to add a signature line on an Excel document that automatically reads the users name from either the login or document properties. is this possible? this will be a template for 40 users and would like to automate as much as possible. thanks, |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this one line UDF:
Public Function user() As String user = Environ("username") End Function -- Gary''s Student - gsnu200747 "dheitz" wrote: I wish to add a signature line on an Excel document that automatically reads the users name from either the login or document properties. is this possible? this will be a template for 40 users and would like to automate as much as possible. thanks, |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am a bit green w/ programming. I may need a bit of a walk through. Do I
just create this as a Macro and edit into the VB module... If i have this doc saved as a template by the Admin, does the "Last Author" recover the Admin as previously saved? does this change when the user "saves as" to a new name? I am also intending to have a second line containing the users email address. can I create some kind of formula to auto fill this info from a retrieved string and a list of address? Thanks, Dave "CLR" wrote: With this function in a Module Public Function LastAuthor() As String Application.Volatile LastAuthor = _ ThisWorkbook.BuiltinDocumentProperties("Last Author") End Function The formula =LastAuthor() in any cell will return the LastAuthor's name, providing the file has been previously saved. Vaya con Dios, Chuck, CABGx3 "dheitz" wrote: I wish to add a signature line on an Excel document that automatically reads the users name from either the login or document properties. is this possible? this will be a template for 40 users and would like to automate as much as possible. thanks, |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am a bit green w/ programming. I may need a bit of a walk through. Do I
just create this as a Macro and edit into the VB module... Does the "username" string draw from the system login name? I am also intending to have a second line containing the users email address. can I create some kind of formula to auto fill this info from a retrieved string and a list of address? Thanks, Dave "Gary''s Student" wrote: Try this one line UDF: Public Function user() As String user = Environ("username") End Function -- Gary''s Student - gsnu200747 "dheitz" wrote: I wish to add a signature line on an Excel document that automatically reads the users name from either the login or document properties. is this possible? this will be a template for 40 users and would like to automate as much as possible. thanks, |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Actually, Gary"s Student's function is slicker than mine. It doesn't require
the file be saved either............just copy and paste it into a regular VBA module, and then just enter =User() in whatever cell you wish the User's name to appear........ Vaya con Dios, Chuck, CABGx3 "dheitz" wrote: I am a bit green w/ programming. I may need a bit of a walk through. Do I just create this as a Macro and edit into the VB module... If i have this doc saved as a template by the Admin, does the "Last Author" recover the Admin as previously saved? does this change when the user "saves as" to a new name? I am also intending to have a second line containing the users email address. can I create some kind of formula to auto fill this info from a retrieved string and a list of address? Thanks, Dave "CLR" wrote: With this function in a Module Public Function LastAuthor() As String Application.Volatile LastAuthor = _ ThisWorkbook.BuiltinDocumentProperties("Last Author") End Function The formula =LastAuthor() in any cell will return the LastAuthor's name, providing the file has been previously saved. Vaya con Dios, Chuck, CABGx3 "dheitz" wrote: I wish to add a signature line on an Excel document that automatically reads the users name from either the login or document properties. is this possible? this will be a template for 40 users and would like to automate as much as possible. thanks, |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks,
That did the job.. although it doesn't automatically update unless I access the cell. w/ a little function work I got the matching to user and email address to work and created a simple macro to auto activate the cell. thanks again. I have another post out here that maybe you could give a quick shot at... same project, i have a Word doc. inserted as an object for a comment field. if i protect the sheet I cannot edit the doc. If I unlock the object and protect the sheet, I can edit the doc but it can be accidentally moved. Is there a way to lock position w/out locking entire object? thanks, Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatically insert user name into Excel | Excel Discussion (Misc queries) | |||
How do i insert my excel user name into a cell? | Excel Discussion (Misc queries) | |||
How do I automatically insert the user (login name) in Excel? | Excel Discussion (Misc queries) | |||
How do I insert a message when a user opens my Excel workbook? | Excel Discussion (Misc queries) | |||
In Excel, how do I insert User Name (author) in a cell. | Excel Discussion (Misc queries) |