Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey everyone. I was wondering how I could throw in some VB for a cel
that is like the last date modified codes, except that I want Excel t input the user name of the person who made the last change into specific cell. If it's possible, how would I go about doing it? Also, if this is possible and I throw the code in, where does Excel ge this username information from? Does it grab the name that was entere when Excel was first installed? Is there a way to modify these things Without uninstalling/reinstalling? Any help would be appreciated. Thanks -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Function LastAuthor()
LastAuthor = Activeworkbook.BuiltinDocumentProperties("Last Author") End Function This would be the name when installed, and you can change in ToolsOptionsGeneral User Name. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Serum " wrote in message ... Hey everyone. I was wondering how I could throw in some VB for a cell that is like the last date modified codes, except that I want Excel to input the user name of the person who made the last change into a specific cell. If it's possible, how would I go about doing it? Also, if this is possible and I throw the code in, where does Excel get this username information from? Does it grab the name that was entered when Excel was first installed? Is there a way to modify these things? Without uninstalling/reinstalling? Any help would be appreciated. Thanks. --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob, thanks for your help, I really appreciate it. Works like a charm
-- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm actually having trouble now.
I'm supposed to throw this into a module right? Then I'm supposed t input =lastauthor() into whatever cell I want this to show up right? It's not working correctly. I need something like the following: Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target A Range) Worksheets("PSR").Range("L1:Q1").Value = Format(Now, "mm/dd/yy hh:mm:ss") End Sub _______________________________________________ This changes a range of cells into the specific date/time forma everytime someone makes a change to the file. I would like t basically achieve the same thing, but with the username changing whe changes are made as well. I hope I'm being clear. The file will be shared on the network, with multiple people using it. While I'm aware I can share the document and track changes that way, I' still like the last time it was modified, and by whom, visible on th worksheet itself. I tried modifying the above code to possibly inser =lastauthor() into a specific cell, but to no avail. I should say I don't have much VB coding experience, well, codin experience in general. Once again, I'd appreciate any help in settin this up -- Message posted from http://www.ExcelForum.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, seems I'm getting closer to figuring this out. Found this in th
forums... Function DocProps(prop As String) Application.Volatile On Error GoTo err_value DocProps = ActiveWorkbook.BuiltinDocumentProperties _ (prop) Exit Function err_value: DocProps = CVErr(xlErrValue) End Function It seems to work for a second, then the cell is replaced with VALUE! The thread said to format the cell to Date, but I've done that and keep gettin VALUE! Everytime I double click on the cell however, I se my username, but then it reverts right back. Anyone have any ideas? can't believe I've been working on this most of the day hahaha -- Message posted from http://www.ExcelForum.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That is not what you asked for, you asked to get the name of the user who
made the last change in a cell. Now you are asking to update the worksheet when a change is made. What exactly do you want? Regards the other response from you, you are also looking at one of my earlier posts. The guy wanted a date, that was why I suggested formatting the cell as date (obvious eh?). It also needs a parameter saying what property, I bet my post said =DocProp("Last Save Time") Tell me exactly what you want, then I may be able to help. By this, I mean what information you want, what will trigger it, will it be changes, if so to what sheet, what cells, etc. Do you want the logon user rather than volatile Excel name? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Serum " wrote in message ... I'm actually having trouble now. I'm supposed to throw this into a module right? Then I'm supposed to input =lastauthor() into whatever cell I want this to show up right? It's not working correctly. I need something like the following: Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Worksheets("PSR").Range("L1:Q1").Value = Format(Now, "mm/dd/yy hh:mm:ss") End Sub _______________________________________________ This changes a range of cells into the specific date/time format everytime someone makes a change to the file. I would like to basically achieve the same thing, but with the username changing when changes are made as well. I hope I'm being clear. The file will be shared on the network, with multiple people using it. While I'm aware I can share the document and track changes that way, I'd still like the last time it was modified, and by whom, visible on the worksheet itself. I tried modifying the above code to possibly insert =lastauthor() into a specific cell, but to no avail. I should say I don't have much VB coding experience, well, coding experience in general. Once again, I'd appreciate any help in setting this up. --- Message posted from http://www.ExcelForum.com/ |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
Ok, sorry for not being so clear in my posts. Here's what I need. I need a cell (L2) to display the last author who made a change to th spreadsheet. ie: I open it up, make a change, the UDF changes L2 t display my name. Then say jack opens it, jack makes a change, I wan L2 to display his name. So, basically I want whoever the last person was to make any change whatsoever, to be displayed in L2. I hope I'm wording what I want better. If it's still not clear, let m know and I'll try try again. I appreciate your help Bob -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need Excel solution - mnthy rtrns using "Modified Dietz" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
"last modified" timestamp function in excel 2003 | New Users to Excel | |||
How do I display the most recent "modified" date in Excel sheets? | Excel Worksheet Functions | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) |