+ Reply to Thread
Results 1 to 2 of 2

How can I print the username or computername from excel?

  1. #1
    YesNo
    Guest

    How can I print the username or computername from excel?

    How do I do, when I print an excel file, to have the username or the computer
    name of the person/computer that is printing it?
    Thanks.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good evening YesNo (????)

    This macro, when called, will set the current username in the left hand footer on the page. This will need to be activated every time the file is opened to capture the current user - for compatability I have used the older auto_open procedure, but if you prefer you could run it from the workbook_open event procedure.

    Sub auto_open()
    For Each sht In ActiveWorkbook.Sheets
    sht.PageSetup.LeftFooter = Application.UserName
    Next sht
    End Sub

    HTH

    DominicB

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1