How to get Name of person signed on Computer

  • Thread starter Thread starter CLR
  • Start date Start date
C

CLR

Hi All...........

This is my code, retrieved from kind souls in these groups.

With wkSht.PageSetup
.CenterFooter = ActiveWorkbook.FullName
.RightFooter = "Rev-L " & Range("DateSecret").Value
.LeftFooter = "Printed by: " & Application.UserName
End With

It all works fine, except for the "UserName" part. My intentions were to
retrieve the name of the person who signed on the computer, but this code
returns the name of the person that this computer's Excel was Installed to.
May this code be modified, or is there some other way to make it print out
who the Computer User is?

Many thanks in advance.....

Vaya con Dios,
Chuck, CABGx3
 
Hi CLR,
One way:
..LeftFooter = "Printed by: " & CreateObject("WScript.Network").UserName

MP
 
How cool it is!!!!!!..........
Your code works exactly like I wanted ...............
Thank You very much kind Sir........

Vaya con Dios,
Chuck, CABGx3
 
How cool it is!!!!!!!!!!

Your code works exactly like I want it to.........
Thank you very much kind Sir.........

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

Back
Top