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

W

wellie

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.
 
J

John Wilson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top