You can probably get the information from the environment variables. For example, on my computer I can get the following variables:
USERNAME
COMPUTERNAME
USERDOMAIN
You access them as, for example, environ("USERNAME".
To see all of them, run this from the immediate window:
i=1:do while environ(i)<>"":?i," ",environ(i):i=i+1:loop
is it possible to generate any kind of log file. when anyone access this shared file it will write that user name & his computer name in to any text file or withing that excel but hidden to users?
Yes, you would have to put a workbook_open event handler on the code page for ThisWorkbook (do you know how to do this?), and from within that sub write an entry to your log file, e.g.
sub workbook_open()
open ThisWorkbook.path & "\logfile.txt" for append as #1
print#1, now(),environ("USERNAME"
close#1
end sub Rob
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.