+ Reply to Thread
Results 1 to 8 of 8

Need to pop up message box when vba project password protect unlock

  1. #1
    Registered User
    Join Date
    11-30-2011
    Location
    Colombo,SriLanka
    MS-Off Ver
    Excel 2007
    Posts
    19

    Question Need to pop up message box when vba project password protect unlock

    Hi ,

    I have an issue with unlock vba project.
    I need to do following.
    1). When vba project unlock message popup say "If wrong password attempt VBA CODE will delete"
    2). If the user attempt more than three need to delete macro module.

    If any body have any clue as how above mention two stept automate in excel(VBA MACRO) Please let me know.
    Now I'm really sufferng with this issue. I gone though several thread, But no one has clear idea on that. Pleassss

    Thanks,
    Harsha

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Need to pop up message box when vba project password protect unlock

    Unprotecting a project does not run any events. This would be futile anyway because your protection can be removed without trying any passwords (I say no more than that).

  3. #3
    Registered User
    Join Date
    11-30-2011
    Location
    Colombo,SriLanka
    MS-Off Ver
    Excel 2007
    Posts
    19

    Question Re: Need to pop up message box when vba project password protect unlock

    Hi Izandol,

    Thanks for your quick respond regarding my issue.
    I can protect VB project by Property mannually.
    What I want is I want to popup a message to other users who try to unprotect project without my permission.
    If they attempt to unlock project 3 time with wrong passwords The 4th attempt will remove all the macro module in particular work book.

    Hope this is clear enough about what I looking at.



    Thanks,

    Harsha

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Need to pop up message box when vba project password protect unlock

    Assuming it was possible what's to stop them openning the workbook with macros disabled and then attemptting password entry?
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    11-30-2011
    Location
    Colombo,SriLanka
    MS-Off Ver
    Excel 2007
    Posts
    19

    Question Re: Need to pop up message box when vba project password protect unlock

    Hi Andy,

    As I attached bellow. I need to popup a message when other users trying to unprotect VBAproject and if they type wrong password more than 3 time the existing all modules in that project will remove or remove all VBcodes of the MODULES.
    teat.png

    Thanks,
    Harsha

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Need to pop up message box when vba project password protect unlock

    We understand what you want, no need to keep repeating the question.


    As Izandol has already said, there no event to capture displaying the password dialog. So the answer is no you can not have a popup.

    And as I said, if the user disables macros then even if there was code it would not run.

    If they really want to see your code they will simply hack the password.
    So in short there is no way to really protect your code, if you don't want them to see it don't give it to them.

  7. #7
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Need to pop up message box when vba project password protect unlock

    Further, if your project is locked how will you remove the code?

  8. #8
    Registered User
    Join Date
    11-30-2011
    Location
    Colombo,SriLanka
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Need to pop up message box when vba project password protect unlock

    No I though, if the attempting is wrong we can pass the correct password through code and remove the module.

    Any how thanks for both of you to help me out on this and clear it out all the scenarios.


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  2. Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  4. Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. Replies: 1
    Last Post: 06-23-2005, 09:05 PM

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