View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default inserting current windows user id into a cell

Hi,

Try this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheets("Sheet1").Range("A1") = "Printed by " & Environ("Username")
End Sub

Mike

"MartyMack74" wrote:

Does anyone know of a function or macro that will allow the current windows
userid to be displayed in a cell such as: "Printed by: userid"? Any help is
greatly appreciated.