User Record
Hey Gary, for some reason I am having trouble with this one.
When you say this is a worksheet code, where do I go to place that in? Do I
just F11 and insert module? Or some other way?
"Gary''s Student" wrote:
Let's assume that the user's name will go in column B across from the "X"
Enter the following worksheet event macro:
Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A:A")
Set t = Target
If Intersect(r, t) Is Nothing Then Exit Sub
If t.Value = "X" Then
Application.EnableEvents = False
t.Offset(0, 1).Value = Environ("username")
Application.EnableEvents = True
End If
End Sub
REMEMBER this is worksheet code, it does not go in a standard module
--
Gary''s Student - gsnu200747
"nabanco" wrote:
Hey,
We have a shared workbook in which we want to record the user's name when
they enter an "X" in column A.
Is there a way to do this?
Thank you
|