View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Log users opening the VBE?

I kinda think you are hooped on this one... Partly because if your code
crashes Excel will try to open the VBE (debug mode) without the user even
requesting it... My only suggestion would be to lock down the access to the
code with a password. Then you can control who has access. I suggest time
stamping any changes that are made in a comment block. "Quartz changed this
line of code on this date to resolve this issue"... or something like that.
It is a good commenting practice to get into.

HTH

"quartz" wrote:

I am using Windows XP with Office 2003.

Does anyone know if it is possible to capture the user name of any user who
opens the visual basic editor (VBE) in Excel? I know how to get the user and
computer name:

ReturnNetworkName = Environ("UserName")
ReturnComputerName = Environ("ComputerName")

But is it possible to know when the VBE is opened and then log this info? If
so, could you please post example code.

Thanks much in advance.