Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default inserting current windows user id into a cell

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting current date pdaws Excel Worksheet Functions 8 September 25th 08 12:37 AM
Inserting current date when number entered in cell & Circular reference error? Pheasant Plucker® Excel Discussion (Misc queries) 4 April 10th 07 10:39 AM
Automatically inserting current date in a cell ng66 Excel Discussion (Misc queries) 2 January 31st 07 08:44 PM
Inserting User Name into a cell Trish Excel Discussion (Misc queries) 1 February 3rd 05 03:25 PM
Function that gives Windows current user name? Petu Excel Worksheet Functions 2 December 8th 04 09:33 AM


All times are GMT +1. The time now is 06:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"