Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how can one put the name of the user at the footer of a sheet
Guys,
How can we make the footer of a sheet shows the name of the user automatically once a user opens the workbook. So if somebody else opens it then the user name will change accordingly. I had this idea of prompting the user for his/her name and then capturing it and putting it at the bottom, but other than that can we capture the same user name the user has used for his microsoft application. Regards, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how can one put the name of the user at the footer of a sheet
From VBA, doubleclick the ThisWorkbook module and insert this code:
Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.RightFooter = Application.UserName End Sub If you would rather not rely on Application.Username, there are API solutions to finding username: Do an groups search for GetUserNameA vb api -- Rob van Gelder - http://www.vangelder.co.nz/excel "Omar" wrote in message ... Guys, How can we make the footer of a sheet shows the name of the user automatically once a user opens the workbook. So if somebody else opens it then the user name will change accordingly. I had this idea of prompting the user for his/her name and then capturing it and putting it at the bottom, but other than that can we capture the same user name the user has used for his microsoft application. Regards, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how can one put the name of the user at the footer of a sheet
Thanks,
I will try it and see if it works. ANyhow thanks, "Rob van Gelder" wrote: From VBA, doubleclick the ThisWorkbook module and insert this code: Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.RightFooter = Application.UserName End Sub If you would rather not rely on Application.Username, there are API solutions to finding username: Do an groups search for GetUserNameA vb api -- Rob van Gelder - http://www.vangelder.co.nz/excel "Omar" wrote in message ... Guys, How can we make the footer of a sheet shows the name of the user automatically once a user opens the workbook. So if somebody else opens it then the user name will change accordingly. I had this idea of prompting the user for his/her name and then capturing it and putting it at the bottom, but other than that can we capture the same user name the user has used for his microsoft application. Regards, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why does a Multi-sheet/user file open on sheet two every time? | Excel Discussion (Misc queries) | |||
Adding User Name to footer | Excel Discussion (Misc queries) | |||
user name in footer | Excel Discussion (Misc queries) | |||
How to: Excel footer which tells me which user last saved sheet | Excel Discussion (Misc queries) | |||
User name in Footer | Excel Discussion (Misc queries) |