View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
ExcelMonkey ExcelMonkey is offline
external usenet poster
 
Posts: 553
Default Unlock Protected VBAProject via code

Correct me if I am wrong Bob but isn't the issue with this method that you
really don't know (in advance) how many TABs you will have to press to
navigate down the items in the Project window? It's obvious when you are
looking at the Project window once teh IDE is open.

I am assuming this is an issue as the items will be a function of all the
Add-ins you have loaded in your Excel and the files you current have open on
your computer.

Thanks

EM

"Bob Phillips" wrote:

You would still need to know the password, it is not a cracking method

This is an example, but you may need to tune it

With Application
.SendKeys "%{F11}", True ' VBE
.SendKeys "^r", True ' Set focus to Explorer
.SendKeys "{TAB}", True ' Tab to locked project
.SendKeys "~", True ' Enter
.SendKeys "password"
.SendKeys "~", True ' Enter
End With

--
__________________________________
HTH

Bob

"Charlotte E." wrote in message
...
Is there a way to unlock a VBAProject via code other than using the
SendKey
method?


How to do that with SendKey???