ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to check if the Excel VBE is opened within Excel? (https://www.excelbanter.com/excel-programming/271590-how-check-if-excel-vbe-opened-within-excel.html)

wellie

How to check if the Excel VBE is opened within Excel?
 
I want to disable the VBE when user opens a secured
workbook. I'v already protected the workbook and
worksheets as well as disabled the VBE from the Tool menu
when user opens the secured workbook. However, I found
that if VBE is opened prior to opening the secured Excel
workbook. The user can still look at the supposedly
secured codes in the workbook.

Can someone please tell me how to check the VBE is already
open such. that I can close it as soon as the user opens a
secured workbook ?

Thanks in advance for your help.

John Wilson

How to check if the Excel VBE is opened within Excel?
 
wellie,

The VBA Editor shouldn't be opened unless the user already has
it opened from another workbook when they open yours.
You could just lock the project with a password and then
it wouldn't matter whether the VBA Editor was opened
or not.
From the VBA Editor.....
Tools/VBA Project Properties/Protection
Check "Lock Project for Viewing"
and enter a passoword.

Note: All passwords, Workbook/Worksheet and VBA can
be cracked by an experienced user.

John

wellie wrote:

I want to disable the VBE when user opens a secured
workbook. I'v already protected the workbook and
worksheets as well as disabled the VBE from the Tool menu
when user opens the secured workbook. However, I found
that if VBE is opened prior to opening the secured Excel
workbook. The user can still look at the supposedly
secured codes in the workbook.

Can someone please tell me how to check the VBE is already
open such. that I can close it as soon as the user opens a
secured workbook ?

Thanks in advance for your help.




All times are GMT +1. The time now is 01:27 AM.

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