View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default Who opens my file?

Chris

In similar situations I have created a logging system where certain
events trigger the writing of data to a text file. If all the copies
of your app will be running on a network, and if there is a spot on
the network that all the users have access to, it is pretty easy to
open the text file and write whatever data you are interested in to
the text file. The writing process could be triggered by the file
open event or file close event and simply write the user name and the
time. Below is a sample where logging and the location of the log
file are controlled by variables in named worksheet cells. The Print
line in your case could include the username, time and whatever else
you desire instead of the stuff I have in the example. Also, in your
case you may be better off hardcoding the location of the log file and
eliminating the option to suppress the logging. Unless you have a
particularly slow network, the logging activity should be barely
noticable.

If Range("Enable_logging") = True Then
fName = Range("Path").Value & Range("Log_file").Value
On Error GoTo EndMacro:
fnum = FreeFile
Open fName For Append Access Write As #fnum
Print #fnum, cName, "Created Export file", "with " & x; "
records", , Now
EndMacro:
On Error GoTo 0
Application.ScreenUpdating = True
Close #fnum
End If

You could actually trigger a process that generates an e-mail, and if
the potential users, including bootleg users are not on a network, you
may have to resort to something along that line. If they are
networked though, I supspect you will be happier just tracking
activity and avoiding auto generated e-mail.

Good luck.

Ken
Norfolk, Va


On Apr 28, 1:31*pm, cht13er wrote:
Good day, thanks for your comments and replies!

I've created a large-scale application with Excel VBA and I would like
to keep track of who uses the program. Because there is always the
possibility that someone made a copy of the file and is working off of
their version, creating a list of users on an xlVeryHidden sheet
wouldn't work...because it's hard to know where the original file
ended up.

I would like to know if there is any way to automatically fire off a
quasi-email .... or how in the world I can approach this!

Thanks for your help!

Chris