![]() |
|
#1
|
|||
|
|||
|
Hello all! Thank you for stopping by.
I'm using the following functions in Excel 07 to retrieve the date and user name of the person who entered a new row. However, when I open the spreadsheet, the existing rows with user names update to my user name. Also, instead of the date showing when the row was entered, it updates to today's date. I don't want the information to change everytime I open the spreadsheet. It should reflect the user name who entered the new row. Here are the functions I'm using:Code:
Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, _
nSize As Long) As Long
Function GetUserName() As String
Application.Volatile
Dim sBuff As String * 25
Dim lBuffLen As Long
lBuffLen = 25
apiGetUserName sBuff, lBuffLen
GetUserName = Left(sBuff, lBuffLen - 1)
End Function
Function DateAndTime()
DateAndTime = Now
End Function
Quote:
Quote:
Thank you, Rey |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drop Down List and Functions (Linking) | sten | Excel | 0 | 03-17-2010 03:03 PM |
| Auto-updating basic math functions & cross-referencing tables | FranklinBluth | Word Tables | 13 | 11-19-2009 10:26 AM |
| Automated Functions?? | nickypatterson | Outlook | 0 | 08-27-2009 01:50 PM |
| Merging a Word doc with VB functions contained | adamwbrown | Word | 0 | 08-13-2008 06:10 AM |
| How to show help for addin functions? | Movses Asatryan | Excel | 0 | 03-02-2006 05:29 AM |