If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"Printed by:" in Footer
Hello,
Is there a way to display the User who printed the document in the Footer? Thanks Ruan |
#2
|
|||
|
|||
"Printed by:" in Footer
Hi
Put the following code in your workbook module (not in a standard module): Private Sub Workbook BeforePrint(Cancel As Boolean) Dim wkSht As Worksheet For Each wkSht In me.Worksheets With wkSht.PageSetup .CenterFooter = "Printed by: " & application.username End With Next wkSht End Sub -- Regards Frank Kabel Frankfurt, Germany "Ruan" schrieb im Newsbeitrag ... Hello, Is there a way to display the User who printed the document in the Footer? Thanks Ruan |
#3
|
|||
|
|||
"Printed by:" in Footer
Thanks Frank,
That worked really great. Ruan "Frank Kabel" wrote in message ... Hi Put the following code in your workbook module (not in a standard module): Private Sub Workbook BeforePrint(Cancel As Boolean) Dim wkSht As Worksheet For Each wkSht In me.Worksheets With wkSht.PageSetup .CenterFooter = "Printed by: " & application.username End With Next wkSht End Sub -- Regards Frank Kabel Frankfurt, Germany "Ruan" schrieb im Newsbeitrag ... Hello, Is there a way to display the User who printed the document in the Footer? Thanks Ruan |
#4
|
|||
|
|||
"Printed by:" in Footer
Frank.........
Is this code intended to return the User that the Excel is installed to, or the User who signed on the computer? Vaya con Dios, Chuck, CABGx3 "Frank Kabel" wrote in message ... Hi Put the following code in your workbook module (not in a standard module): Private Sub Workbook BeforePrint(Cancel As Boolean) Dim wkSht As Worksheet For Each wkSht In me.Worksheets With wkSht.PageSetup .CenterFooter = "Printed by: " & application.username End With Next wkSht End Sub -- Regards Frank Kabel Frankfurt, Germany "Ruan" schrieb im Newsbeitrag ... Hello, Is there a way to display the User who printed the document in the Footer? Thanks Ruan |
#5
|
|||
|
|||
"Printed by:" in Footer
Hi
the first one :-) For the latter one you'll need a different approach. e.g. Public Function WinUserName() As String WinUserName = Environ("UserName") End Function -- Regards Frank Kabel Frankfurt, Germany CLR wrote: Frank......... Is this code intended to return the User that the Excel is installed to, or the User who signed on the computer? Vaya con Dios, Chuck, CABGx3 "Frank Kabel" wrote in message ... Hi Put the following code in your workbook module (not in a standard module): Private Sub Workbook BeforePrint(Cancel As Boolean) Dim wkSht As Worksheet For Each wkSht In me.Worksheets With wkSht.PageSetup .CenterFooter = "Printed by: " & application.username End With Next wkSht End Sub -- Regards Frank Kabel Frankfurt, Germany "Ruan" schrieb im Newsbeitrag ... Hello, Is there a way to display the User who printed the document in the Footer? Thanks Ruan |
#6
|
|||
|
|||
"Printed by:" in Footer
Thank you Sir.........another one for my goodie-stash
Vaya con Dios, Chuck, CABGx3 "Frank Kabel" wrote in message ... Hi the first one :-) For the latter one you'll need a different approach. e.g. Public Function WinUserName() As String WinUserName = Environ("UserName") End Function -- Regards Frank Kabel Frankfurt, Germany CLR wrote: Frank......... Is this code intended to return the User that the Excel is installed to, or the User who signed on the computer? Vaya con Dios, Chuck, CABGx3 "Frank Kabel" wrote in message ... Hi Put the following code in your workbook module (not in a standard module): Private Sub Workbook BeforePrint(Cancel As Boolean) Dim wkSht As Worksheet For Each wkSht In me.Worksheets With wkSht.PageSetup .CenterFooter = "Printed by: " & application.username End With Next wkSht End Sub -- Regards Frank Kabel Frankfurt, Germany "Ruan" schrieb im Newsbeitrag ... Hello, Is there a way to display the User who printed the document in the Footer? Thanks Ruan |
Thread Tools | |
Display Modes | |
|
|