#1   Report Post  
DKY
 
Posts: n/a
Default


Okay, so here's my code then (that I stole from this site and revised to
fit my needs).


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(.Cells, Me.Range("E:E")) Is Nothing Then
Application.EnableEvents = False
With .Offset(0, 2)
.Value = Now
.NumberFormat = "mmm dd yyyy hh:mm:ss AM/PM"
End With
End If
End With
ws_exit:
Application.EnableEvents = True
End Sub
--------------------


How would I go about adding the windows log-on username to this? I
found this

http://blogs.officezealot.com/charle...2/10/3574.aspx

Which says you can use this


Code:
--------------------
Function UserNameWindows() As String
UserName = Environ("USERNAME")
End Function
--------------------


But where do I put the function in the code and how do I call it to
use?


--
DKY
------------------------------------------------------------------------
DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=380369

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
Date/Time stamp with one stroke? Reverse_Solidus Excel Discussion (Misc queries) 10 June 30th 05 01:00 AM
date/time Jan Excel Worksheet Functions 3 June 19th 05 05:47 AM
Date/time range based calculations jim314 Excel Discussion (Misc queries) 1 April 28th 05 07:21 PM
bringing data from one workbook to another using a date stamp func tifosi3 Excel Worksheet Functions 0 April 5th 05 12:13 AM
How do i convert a number of seconds to a date/time? Margo Excel Worksheet Functions 2 January 5th 05 12:09 AM


All times are GMT +1. The time now is 10:40 AM.

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"