How do I print the name of the person printing a spreadsheet?

  • Thread starter Thread starter mhofficer
  • Start date Start date
M

mhofficer

I have set up a =(now) function to print at the top of each spreadsheet

I would like to know WHO has printed a particular spreadsheet.

does Excel provide a similar simple function for this please?
 
Does the below UDF help. If you are new to macros set the Security level to
low/medium in (Tools|Macro|Security). From workbook launch VBE using
short-key Alt+F11. From menu 'Insert' a module and paste the code.

Function GetUser()
GetUser = Environ("UserName")
End Function

Try in any cell enter formula
=GetUser()

If this post helps click Yes
 
another way

pres ALT+F11 to get to VBA window
double click on ThisWorkbook module in Projest - VBA Project window
paste this code i the code window

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Range("B1").Value = Application.UserName
End Sub

this macro will casue to print user name in B1

pls click YES if this helped
 
Back
Top