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

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?
 
J

Jacob Skaria

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
 
J

Jarek Kujawa

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
 

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

Top