Below the VBA code but I can not manage it. Is there any way to open VBA code from other VBA code with password-protected VBAProject.
Sub UnprotecPassword()
Dim currentActiveWb As Workbook
Set wb = ActiveWorkbook
If wb.VBProject.Protection <> 1 Then
Exit Sub
End If
Set currentActiveWb = ActiveWorkbook
wb.Activate
SendKeys "%{F11}"
SendKeys "^r" ' Set focus to Explorer
SendKeys "{END}" ' Tab to locked project
SendKeys "~" ' Enter
SendKeys "pass"
SendKeys "~" ' Enter
If (wb.VBProject.Protection = vbext_pp_locked) Then
MsgBox ("failed to unlock")
End If
currentActiveWb.Activate
End Sub