Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve User Name

Status
Not open for further replies.

eBartlett

Technical User
Sep 25, 2001
10
US
I would like the user name to appear as a footnote in Excel. I have the syntax to access the network login id, but I want to capture the user's full name from Excel. Does anyone know how to do this?
 
Same question, new twist. How do I get this information into the footer of all worksheets? The user may add worksheets and I want to make sure the username is captured on all of them? My macro appears below:


Private Sub Workbook_Open()
Worksheets("Event Wizard").PageSetup.RightFooter = Application.UserName
End Sub


 
Put your code in the Workbook_NewSheet event

Private Sub Workbook_NewSheet(ByVal Sh As Object)

Sh.PageSetup.RightFooter = Application.username

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top