Home » Blog » Topic » Help: Misplaced/Lost Password Issue Of VBA Project File

Help: Misplaced/Lost Password Issue Of VBA Project File

Mariya Beckham ~ Modified: July 15th, 2016 ~ ~ 1 Minute Reading

Home Forums Help: Misplaced/Lost Password Issue Of VBA Project File

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2434 Score: 0
    Mariya Beckham
    Moderator
    2 pts

    “How to unlock my Password Protected VBA project?”

    Some days ago the former employee of my organization who is working with the VBA project had left the organization. The issue arise when the password of the protected VBA project is also not mentioned by that former employee. As the file is assigned to me and I tried every possible steps to do it but failed. Kindly help me out for ways to crack or remove VBA module password easily.

    #2471 Score: 0
    Kerry Morris
    Moderator
    33 pts

    Hi,

    Well there are some ways by which you can access you password protected VBA in case you lost or forgot your password. Try the Hex Editor. There is the simplest technique for it.

    1. Download hex editor
    2. Save your worksheet as. xls & also create a backup copy.
    3. Now open that .xls format worksheet in hex editor.
    4. Find and replace DPB keyword with DPX (example)
    5. Save changes.
    6. Open the file. You can see an error of 40230.
    7. Simply open Project explorer and view your VBA project as excel stops there only.
    8. Kindly keep the copy of your new worksheet also.

    Thanks & Regards
    Kerry Moris

    #2483 Score: 0
    Mariya Beckham
    Moderator
    2 pts

    Hi as you said I tried the hex editor method but sorry i cannot find this simple and easy for me and I questioned a lot of people about hex editor but seems no one knows it well like you. Kindly suggest some easy method as I am not from that strong technical background and not excel in codes too.

    Regards
    Mariya

    #2524 Score: 0
    Kerry Morris
    Moderator
    33 pts

    Hi

    Hex editor is the best way for removing VBA password. You can ask me for further assistance of every steps where you got stuck.

    Thanks & Regards
    Kerry Moris

    #2557 Score: 0
    Henry Davidson
    Moderator
    31 pts

    Hi,

    After considering your issue I have got another method to resolve it. You can so some manual coding to remove VBA project password.

    Thanks & Regards
    Henry

    #2558 Score: 0
    Mariya Beckham
    Moderator
    2 pts

    Well as I have already mentioned that Hex editor is not working properly or may be I am not applying that method properly. But I really need some advice or solution for my VBA module. Please tell me the method you are saying about, may be it will help me out.

    #2559 Score: 0
    Henry Davidson
    Moderator
    31 pts

    Hi,

    Do some coding mentioned below for resolving your issue.

    Public Sub UnprotectVBAProject()
    'This has been tested in E97 only.
    On Error GoTo ErrHandler
    Const conPW as String = "MyPassword"
    
    'Open VBE
    Call SendKeys("%{F11}", True)
    'Open Project Explorer
    Call SendKeys("%(V)P", True)
    'PageUp 5 times to be sure "VBAProject" is selected
    Call SendKeys("{PGUP 5}", True)
    'Hit Enter to give prompt, enter PW and Enter again.
    Call SendKeys("{ENTER}" & conPW & "{ENTER}", True)
    
    ExitProcedure:
    Exit Sub
    
    ErrHandler:
    Select Case Err.Number
    Case Else
    Application.ScreenUpdating = True
    MsgBox Err.Number & vbNewLine & Err.Description,
    vbCritical
    Resume ExitProcedure
    Resume
    End Select

    End Sub

    This be unlock your VBA file. For further assistance kindly ask freely.
    Thanks & Regards
    Henry

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.