I've modified the code for UN-protecting Excel VBA Project to work with Microsoft Project from the link below.
Unprotect VBProject from VB code
But in MS Project there is always a Global.mpt(my code runs from here) and when the below line executes
projAp.VBE.CommandBars(1).FindControl(ID:=2578, recursive:=True).Execute
it always opens the VBA Project Properties of the Global.mpt file.
How do I select my Project Plan's VBA Project Properties? Is there a Windows API function that would let me choose the second VBA Project Shown in the screen host. Launching the FindControl command after selecting the proejct should launch it corresponding VBA Project Properties(Manually tried this).