Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want a tracker for my excel workbook. The usernames I
need are the xp logons not the usernames seen as licenced with office. I do not mind if there is a seperate file held but I need to be able to restore any changes made and know who made them. The sheets will be used by some people which may not want the spreadsheet to work because it is changing the way they have been doing things for years as far as information collection. Tom |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have worked it out I will share it with everyone.
It is the best possible solution and holds all info in a dll file seperately. It gets the windows xp username and not the application username too. here goes -- paste this into thisworkbook Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Target.Locked Then TrackFile = "E:\Documents and Settings\All Users\Desktop\Tracker.dll" TargUser = UserName() TargAddr = Sh.Name & "!" & Target.Address(False, False) TargVal = Target.Resize(1, 1).Text TargDate = Format(Now, "yyyy/mm/dd hh:mm") x = TargDate & vbTab & TargUser & vbTab & TargAddr & vbTab & TargVal Open TrackFile For Append As #1 Print #1, x Close #1 End If End Sub Then paste this into a new module - Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _ (ByVal lpBuffer As String, nSize As Long) As Long Function UserName() As String Dim Buffer As String * 100 Dim BuffLen As Long BuffLen = 100 GetUserName Buffer, BuffLen UserName = Left(Buffer, BuffLen - 1) End Function You will now have a dll file in your choice of location which can be opened in notepad. -----Original Message----- I want a tracker for my excel workbook. The usernames I need are the xp logons not the usernames seen as licenced with office. I do not mind if there is a seperate file held but I need to be able to restore any changes made and know who made them. The sheets will be used by some people which may not want the spreadsheet to work because it is changing the way they have been doing things for years as far as information collection. Tom . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vacation Tracker | Excel Discussion (Misc queries) | |||
vacation tracker | Excel Discussion (Misc queries) | |||
Tracker | Excel Worksheet Functions | |||
I am making MIS tracker | Excel Discussion (Misc queries) | |||
MIS tracker | Excel Worksheet Functions |