"Printed by:" in Footer

  • Thread starter Thread starter Ruan
  • Start date Start date
R

Ruan

Hello,

Is there a way to display the User who printed the document in the Footer?

Thanks
Ruan
 
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
 
Thanks Frank,

That worked really great.

Ruan


Frank Kabel said:
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
 
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
 
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
 
Thank you Sir.........another one for my goodie-stash

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

PowerPoint Separate lines (line break) - PowerPoint Footer 1
Writing the Sheet Name to a Cell 2
Sheet Function 1
Info on Worksheet Size 1
want footers to display but not print 2
Excel Unique last page footer 1
Footer on Page Two 4
Finding Minimum value 4

Back
Top