Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Check if Worksheet TAB is protected or Not Ananth Excel Discussion (Misc queries) 3 March 30th 09 01:08 PM
Enable check box in protected sheet + group check boxes Dexxterr Excel Discussion (Misc queries) 4 August 2nd 06 12:00 PM
password protected a check box Glendon MacBurnie Excel Worksheet Functions 0 January 27th 05 07:52 PM
check if protected Lloyd Excel Programming 2 February 15th 04 09:08 PM
Check if activesheet is protected freseh Excel Programming 1 January 30th 04 03:02 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"