ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check VBAproject is protected or not (https://www.excelbanter.com/excel-programming/351687-check-vbaproject-protected-not.html)

helmekki[_123_]

Check VBAproject is protected or not
 

Hi there

Is there a vba code to check if the VBAproject is protected or not ,
and if not some action will be done ?


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=505910


Leith Ross[_504_]

Check VBAproject is protected or not
 

Hello Hesham,

If you have another Workbook open along with your project then the
answer is yes. You must add a reference to the VBA Extensibility
Library for this code to work.

Answer = VBAProject("Project Name").Protected

If Answer is yes, the project is protected.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=505910


Dave Peterson

Check VBAproject is protected or not
 
something like:

If ActiveWorkbook.VBProject.Protection Then
MsgBox "Protected project" & vbLf & "Cannot complete"
Exit Sub
End If



helmekki wrote:

Hi there

Is there a vba code to check if the VBAproject is protected or not ,
and if not some action will be done ?

--
helmekki

------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=505910


--

Dave Peterson

helmekki[_124_]

Check VBAproject is protected or not
 

Thank u very much


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=505910



All times are GMT +1. The time now is 06:15 PM.

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