+ Reply to Thread
Results 1 to 4 of 4

Check VBAproject is protected or not

  1. #1
    Forum Contributor
    Join Date
    03-09-2004
    Posts
    140

    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 ?
    Yours
    hesham Almakki
    http://www.almakki.com.ly/

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    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 = VBProject("Project Name").Protected

    If Answer is yes, the project is protected.

    Sincerely,
    Leith Ross
    Last edited by Leith Ross; 01-27-2006 at 07:01 PM.

  3. #3
    Dave Peterson
    Guest

    Re: 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. #4
    Forum Contributor
    Join Date
    03-09-2004
    Posts
    140

    Thumbs up

    Thank u very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1