RobMatthews
Board Regular
- Joined
- Nov 16, 2008
- Messages
- 81
Hey all.
What are your respective thoughts on tracking the usage of tools that you create for a user group? In the last little while it has occurred to me that something like recording the number of times any give tool is used might be useful; for such things as monitoring which tools are used more often, and which users take advantage of which tools, not to mention at Review time.
To that end, I have started retro-actively adding the following snippet of code to each tool that I release, with the date of tracking included at the top of each text file. (Separate file for each tool, obviously files live on a freely available network drive).
What do you do? (or how can i do this better? Like into an excel file open, add data and close in double-quick time, invisibly..)
What are your respective thoughts on tracking the usage of tools that you create for a user group? In the last little while it has occurred to me that something like recording the number of times any give tool is used might be useful; for such things as monitoring which tools are used more often, and which users take advantage of which tools, not to mention at Review time.
To that end, I have started retro-actively adding the following snippet of code to each tool that I release, with the date of tracking included at the top of each text file. (Separate file for each tool, obviously files live on a freely available network drive).
What do you do? (or how can i do this better? Like into an excel file open, add data and close in double-quick time, invisibly..)
Code:
'============== Append a file to keep track of usage
Dim oFS, TS, FileObj
Set oFS = CreateObject("Scripting.FileSystemObject")
Set FileObj = oFS.GetFile("NetworkPath\DescriptiveFileName.txt<NETWORKPATH\DESCRIPTIVEFILENAME.TXT>")
Set TS = FileObj.OpenAsTextStream(8, -2) 'ForWriting, TristateUseDefault)
TS.writeline Application.UserName & ", with " & Cells.SpecialCells(xlCellTypeLastCell).Row & " Rows on " & Date
TS.Close
Set TS = Nothing
Set FileObj = Nothing
Set oFS = Nothing
'==============