Protection property of the VBA project

H

helmekki

Hi there

Is there a vba code to check the Protection property of the VBA projec
in a an Excel File ?.

So that a MsgBox tells me that the VBAProject is protecte
 
J

Jim Rech

MsgBox Workbooks("Book1.xls").VBProject.Protection = vbext_pp_locked

returns true if the project is locked.

--
Jim
message |
| Hi there
|
| Is there a vba code to check the Protection property of the VBA project
| in a an Excel File ?.
|
| So that a MsgBox tells me that the VBAProject is protected
|
|
| --
| helmekki
|
|
| ------------------------------------------------------------------------
| helmekki's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=6939
| View this thread: http://www.excelforum.com/showthread.php?threadid=394181
|
 
J

Jim Rech

Use a 1 in place of vbext_pp_locked if you do not have a reference set to VB
extensibility.

--
Jim
message |
| Hi there
|
| Is there a vba code to check the Protection property of the VBA project
| in a an Excel File ?.
|
| So that a MsgBox tells me that the VBAProject is protected
|
|
| --
| helmekki
|
|
| ------------------------------------------------------------------------
| helmekki's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=6939
| View this thread: http://www.excelforum.com/showthread.php?threadid=394181
|
 

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