Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capture user name
Hello,
I have this statement in macro that insert the date in a cell anytime someone makes a change within a given row: If Intersect(Target, Columns("G:R")) Is Nothing Then Exit Sub End If n = Target.Row Cells(n, "U").Value = Format(Now, "mm-dd-yyyy") End Sub I'd also like it to capture the username and input it in the same cell -- what do I need to do add to this statement to make that happen? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capture user name
try this line
Cells(n, "U").Value = Environ("Usernme") & " " & Format(Now, "mm-dd-yyyy") -- Gary "Kamran" wrote in message ... Hello, I have this statement in macro that insert the date in a cell anytime someone makes a change within a given row: If Intersect(Target, Columns("G:R")) Is Nothing Then Exit Sub End If n = Target.Row Cells(n, "U").Value = Format(Now, "mm-dd-yyyy") End Sub I'd also like it to capture the username and input it in the same cell -- what do I need to do add to this statement to make that happen? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capture user name
sorry had a misspelling
Cells(n, "U").Value = Environ("Username") & " " & Format(Now, "mm-dd-yyyy") -- Gary "Kamran" wrote in message ... Hello, I have this statement in macro that insert the date in a cell anytime someone makes a change within a given row: If Intersect(Target, Columns("G:R")) Is Nothing Then Exit Sub End If n = Target.Row Cells(n, "U").Value = Format(Now, "mm-dd-yyyy") End Sub I'd also like it to capture the username and input it in the same cell -- what do I need to do add to this statement to make that happen? Thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capture user name
Great, that did it. Thanks.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Capture user ID... | Excel Discussion (Misc queries) | |||
Capture user input into xldialog print | Excel Programming | |||
Capture the range a user selects and put in textbox. | Excel Programming | |||
How to capture when a User changes the printer | Excel Programming | |||
How to capture user ID in Excel macro? | Excel Programming |