ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Log users opening the VBE? (https://www.excelbanter.com/excel-programming/327538-log-users-opening-vbe.html)

quartz[_2_]

Log users opening the VBE?
 
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.

Jim Thomlinson[_3_]

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.



All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com